Giter Club home page Giter Club logo

mariecreel.github.io's Introduction

Basic React Boilerplate

Setup a basic React app skeleton. Built with Webpack and Babel.

Motivation

I wanted to create my own React app boilerplate without using create-react-app. I think it gives me a better understanding of how the different pieces work together to form the whole app.

Get started

  1. Select "use this template" in the options on GitHub to create new repo using this boilerplate.
  2. Clone to local machine.
  3. Run yarn install.
  4. To build the default template, run yarn run create. This triggers a webpack build.
  5. To run a development server, run yarn start. You should now be able to view the basic hello world app in your browser at localhost:8080.

Styles

There is a small set of base styles in src/index.css. These styles set box sizing to border box, and reset padding/margin to 0 on all elements. They also set height to 100% for html, body, and the React root element.

This app is setup to style components using the styled-components library. You could theoretically style all parts of your app in css files, but I believe it is easier to understand style scope and troubleshoot style issues when they are applied at the component level. styled-components also has nifty features like automatic critical css (good for load times) and automatic vendor prefixing (good for cross browser compatibility, and no need to run styles through Autoprefixer!). For more information on styled-components, check out the documentation.

Webpack and Babel

Webpack bundles the various assets used in your app and creates builds for distribution. Babel compiles modern JavaScript (ES6) in a way that newer JavaScript features (like ES6 imports) can be used in older browsers. This is a simplification of their benefits, in reality they are both powerful tools for managing the way your application is distributed and maintained.

Coolors Palette

mariecreel.github.io's People

Contributors

nickcreel avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.