Skip to content

Boilerplate repository for a react app with webpack and redux

Notifications You must be signed in to change notification settings

stephenhood99/react-webpack-boilerplate

Repository files navigation

Getting started

This was made with npm 9.4.2 and might not work for earlier or later major versions.

Run npm install to setup dependencies, then run the app with npm run start.

The app will run on localhost:3000, but the port can be changed in webpack.config.base.js

What is this?

This boilerplate code is a combination of React, React Redux, and Webpack. The actual code is configured for typescript, but javascript is also enabled.

React

React is library for user interfaces which is concerned only with rendering. See React's official website for more information.

React Redux

Redux is essentially a predictable state container. Rather than needing to worry about useState throughout the project, Redux can manage state updates and propogate state changes for you (however, don't just throw all your stateful needs on Redux. useState is still good to use whenever that state is contained within one file). See Redux's official website for more information

Where is it?

The sample code for Redux is in the src/state folder. The hooks and store files are pretty standard and won't need to be modified for the most part. The main logic is within the exampleSlice.

Webpack

Webpack takes modules with dependencies and bundles them into static assets to make life easy. It also enables us to use cool things like less, which is an awesome version of .css files. The webpack files include

  • webpack.config.base.js
  • webpack.config.dev.js
  • webpack.config.prod.js
  • tsconfig.json
  • babel.config.json
  • And potentially others that I forgot

See Webpack's official website for more information

About

Boilerplate repository for a react app with webpack and redux

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published