Skip to content

The updated and opinionated React boilerplate. Clone this repo and start writing React components straight away.

License

Notifications You must be signed in to change notification settings

khanglu/opinionated.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Opinionated

Opinionated React boilerplate with Next.js and styled-components.

Handle all these buzzwords without you making a decision:

  • Server-side rendering
  • Routing library
  • Styling library
  • Code bundling and transpiling
  • Hot reloading
  • Code splitting
  • ES6(+), ES2015(+) support

So you can focus on writting modern and production ready web app.

What's inside

Why

Next.js

  • Configuration abstraction.
  • Server-side rendering, code splitting, bundling assets.

Styled-components

  • Clean, matured and most popular styling library for React components.
  • Support server-side rendering.

Babel stage-2

  • Safe enough and cover all widely-used ES6+ features.

How to use

In your command line tool

  1. Clone this repo:
git clone https://github.com/khanglu/opinionated.js
  1. Install and run
npm install
npm run dev

A dev server will be served at http://localhost:3000

How to structure project

  • Put pages/routes components in pages folder.
  • Put react components in components folder.
  • Put static assets in static folder.

Suggestion

  • Add prettier plugin to your editor, turn on code formatting on save and forget about eslint.
  • Use Jest and Enzyme for unit testing.
  • If you use Redux, put a store in each page/route using a higher-order component.

About

The updated and opinionated React boilerplate. Clone this repo and start writing React components straight away.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published