A progressive web app starter with NextJS, redux and bootstrap
-
v0.1.1 a bit better for not that much efforts. Performance score would be far better without using bootstrap (actully fetched from https://maxcdn.bootstrapcdn.com)
-
v0.0.1 (first version: with no optimizations!) pretty nice for an out of the box starting PWA starter!
Front:
- Next js (9.x+ github 🔗)
- React JS (16.8.x+ - github 🔗)
- redux (as your application grows managing state will be a serious concern, save pain with Redux)
- redux-persist 5.x (simplifies your NextJS state share between pages github 🔗)
- localForage
- react-redux (Redux is not specific to ReactJS, you could easily use it with Angular2 for instance)
- redux-thunk (simple and does the job)
- next-redux-wrapper
- redux-devtools-extension (github 🔗)
- reactstrap (github 🔗)
- axios (github 🔗 Why: simple, complete, isomorphic ...)
Tool chain:
- Next js (9.x+ github 🔗)
- Babel 7+ (custom babel)
- Flow JS types
fav icon:
- favicons generated by realfavicongenerator
IMPORTANT: Next JS
when redux
connected
- you are forced to connect each page (even if you don't need redux in that page) with
withRedux
fromnext-redux-wrapper
(see page1 as an example). - each sub component you may want to connect should be connected by usual
connect
fromredux
(see Header component as an example)
IMPORTANT: use Layout component on each Page:
- Layout is the Layout (better to my mind than using
_document
) of each page - Layout component will register the service worker (registering an already registered service worker is no effect but ensures it will register at any page user would enter the application)
yarn install
run dev with hot reload
Clone this repository, then install dependencies:
yarn run start
build dev bundle
yarn run build
start dev (no hot reload)
NOTE: ensure you built first before starting
yarn run start
Do you use & ❤️ react-redux-nextjs-bootstrap-pwa-starter
but you don’t find a way to show some love?
If yes, please consider donating to support this project. Otherwise, no worries, regardless of whether there is support or not, I will keep maintaining this project. Still, if you buy me a cup of coffee I would be more than happy though 😄
The MIT License (MIT)
Copyright (c) 2019 Erwan DATIN
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.