All Projects → werein → React

werein / React

Extremely simple boilerplate, easiest you can find, for React application including all the necessary tools: Flow | React 16 | redux | babel 6 | webpack 3 | css-modules | jest | enzyme | express + optional: sass/scss

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to React

React Pages Boilerplate
Deliver react + react-router application to gh-pages
Stars: ✭ 134 (-45.08%)
Mutual labels:  webpack, babel, boilerplate, jest, enzyme, react-router, css-modules
Js Stack Boilerplate
Final boilerplate code of the JavaScript Stack from Scratch tutorial –
Stars: ✭ 145 (-40.57%)
Mutual labels:  webpack, babel, express, boilerplate, jest, react-router
React Redux Universal Boilerplate
An Universal ReactJS/Redux Boilerplate
Stars: ✭ 165 (-32.38%)
Mutual labels:  webpack, babel, boilerplate, enzyme, react-router, css-modules
Express React Boilerplate
🚀🚀🚀 This is a tool that helps programmers create Express & React projects easily base on react-cool-starter.
Stars: ✭ 32 (-86.89%)
Mutual labels:  webpack, babel, express, boilerplate, jest, react-router
React Cool Starter
😎 🐣 A starter boilerplate for a universal web app with the best development experience and a focus on performance and best practices.
Stars: ✭ 1,083 (+343.85%)
Mutual labels:  webpack, express, boilerplate, react-router, css-modules
Express Webpack React Redux Typescript Boilerplate
🎉 A full-stack boilerplate that using express with webpack, react and typescirpt!
Stars: ✭ 156 (-36.07%)
Mutual labels:  webpack, babel, express, jest, react-router
React Boilerplate
Production-ready boilerplate for building universal web apps with React and Redux
Stars: ✭ 53 (-78.28%)
Mutual labels:  webpack, babel, boilerplate, jest, css-modules
Reeakt
A modern React boilerplate to awesome web applications
Stars: ✭ 116 (-52.46%)
Mutual labels:  webpack, express, jest, enzyme, react-router
Pwa
An opinionated progressive web app boilerplate
Stars: ✭ 353 (+44.67%)
Mutual labels:  webpack, babel, boilerplate, jest, react-router
React Redux Boilerplate
Awesome React Redux Workflow Boilerplate with Webpack 4
Stars: ✭ 307 (+25.82%)
Mutual labels:  webpack, boilerplate, jest, enzyme, css-modules
React Ssr Setup
React Starter Project with Webpack 4, Babel 7, TypeScript, CSS Modules, Server Side Rendering, i18n and some more niceties
Stars: ✭ 678 (+177.87%)
Mutual labels:  webpack, babel, express, react-router, css-modules
Starter React Flux
Generate your React PWA project with TypeScript or JavaScript
Stars: ✭ 65 (-73.36%)
Mutual labels:  webpack, babel, jest, react-router
Starter Lapis
Cutting edge starter kit
Stars: ✭ 72 (-70.49%)
Mutual labels:  webpack, boilerplate, jest, react-router
Typescript Webpack React Redux Boilerplate
React and Redux with TypeScript
Stars: ✭ 182 (-25.41%)
Mutual labels:  webpack, babel, boilerplate, css-modules
Mostly
They mostly come at night; mostly.
Stars: ✭ 78 (-68.03%)
Mutual labels:  webpack, babel, express, jest
React Redux Saucepan
A minimal and universal react redux starter project. With hot reloading, linting and server-side rendering
Stars: ✭ 86 (-64.75%)
Mutual labels:  babel, express, boilerplate, react-router
React Boilerplate
This project is deprecated. Please use CRA instead.
Stars: ✭ 88 (-63.93%)
Mutual labels:  webpack, babel, boilerplate, jest
React Bootstrap Webpack Starter
ReactJS 16.4 + new React Context API +react Router 4 + webpack 4 + babel 7+ hot Reload + Bootstrap 4 + styled-components
Stars: ✭ 103 (-57.79%)
Mutual labels:  webpack, babel, jest, react-router
Universal React Redux
🧐 A sensible universal starter kit for React + Redux
Stars: ✭ 112 (-54.1%)
Mutual labels:  webpack, babel, react-router, css-modules
Front End Guide
📚 Study guide and introduction to the modern front end stack.
Stars: ✭ 14,073 (+5667.62%)
Mutual labels:  webpack, babel, jest, css-modules

React

Build StatusWindows Build Status Code Climate

Deploy

Extremely simple boilerplate, easiest you can find, for React application including all the necessary tool

  • React 16
  • Redux
  • Webpack 3
  • Babel 6
  • CSS modules
  • React Router
  • Connected Router (react router + redux)
  • Redux DevTools
  • Eslint
  • Jest & Enzyme
  • Express

And optional (just install missing dependencies):

  • Sass/SCSS - npm i node-sass sass-loader --save
  • Surge - npm i surge -g

Also take a look here for also extremely simple React Native boilerplate

Flow

There is a version with flow enabled, since everyone is using it these days and quite a lot of libraries has direct support, I've also created a branch where flow is supported. This setup allows you for example to see an action and theirs data in correctly in reducers switch statement, doesn't let you to dispatch and undefined action or to see state in a mapStateToProp. Please thumbs up or don't in a PR for merge: https://github.com/werein/react/pull/52

Installation

All you need to do is clone this repository

git clone https://github.com/werein/react.git

Keep it up to date

Track this repo

git remote add upstream https://github.com/werein/react.git

Get the latest version and apply onto your stack

git fetch upstream
git merge upstream/master

Running

Application has very few dependencies, so it’s most probably very easy to understand when you scan through the code, but there is at least few steps you should know

Start front-end React application

Application is divided into two parts. One is pure React front-end, powered by webpack-dev-server in development mode.

To start this application run command below and open your app on http://localhost:8080

npm start

To test your application, run

  • npm run test - single run - good for CI or precook
  • npm run test:watch - watches for changes, good for development

If you don’t plan to connect to your own backend, you should be just fine

Start Express back-end

Second part of this application is back end written in Express. This is a place, where you provide API for front-end or/and server yours production application.

To start backend server, run npm command bellow and open http://localhost:8181

npm run server

This is also watching for changes, so when you update some code on backend, you don’t have to restart the server, it does that automatically

Every call which goes to /api is proxied to this backend so for example when you make a request to /api/locales on front-end, it will go to this express backend server using the same path

Production

Running npm run build will create production ready application into your dist folder. All you need to do is make this dist folder publicly available. You can use surge.sh as described bellow to do so.

Included Express server is preconfigured to serve /dist folder. All you need to do is run npm run server on your production server. The same is happening automatically, when you deploy to Heroku (It executes this command from Procfile

This is also good to run on your local computer to ensure, that your application is running as it should.

Current production size is 205kb and 56.8kb gziped

Deployment

Surge.sh

Simple, single-command web publishing. Publish HTML, CSS, and JS for free, without leaving the command line.

  • Don't forge to install Surge npm i surge -g
  • Run deployment command - npm run surge

Heroku

Heroku works out of the box, just use "deploy to heroku" button

Tools

This project works with ReduxDevtool extension for chrome. Read more

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].