v4.0: "The One With Hooks (And Much More)" Edition
React Boilerplate v4.0 is out and it's a doozy! Here are the highlights:
- React has added many new features and it's time for React Boilerplate to embrace them.
- We now use
Suspensefor component lazy-loading instead of an external library.
- We've added
useInjectReducerhooks to manage saga and reducer injection. They're integrated into the generators and thus become the new defaults. (Should you need them, the HOCs are still there.)
- The generators don't support classes anymore. The
Componentchoice was replaced with an option to wrap your component inside
- We now use
- After much deliberation,
Immutable.jsis finally gone. We've added
- Following the release of React Hooks, it's become even clearer that
react-testing-libraryis now the industry-standard for React DOM testing. Workarounds for the incompatibilities between
styled-componentsare gone and we can now write leaner and more meaningful tests.
There are many more changes to our documentation, internals and general project setup. You can find a full changelog below.
We hope you enjoy this release and welcome any feedback, bug reports or feature suggestions you can send our way!
Immutable.jsin favor of
- Migrate from
- New instructions for snapshot and behavior testing
- Embracing Hooks (@julienben)
- Migrate all class components to functions
- Remove generator options to extend
PureComponent. Replace with a
loadable-componentsto code-split and asynchronously load components (@julienben)
- Update Heroku deployment instructions (@TheAncientGoat)
- Add subfolder deployment instructions (@nshimiye)
- Add AWS EB deployment instructions (@Al-un)
- Spelling and grammar fixes (@khayyamsaleem, @ngtan)
- Many dependency updates including: (@julienben)
- Update default saga injection mode to DAEMON (@howardya)
- Update generators to reflect all the stack changes
- Migrate default Node version to
- Fix support for
- Fix setup script for Windows environments (@Mensae)
- Generate passing tests for components/containers (@mjhost)
- Rewrite generators code (@Mensae)
- Complete rewrite or
- New Webpack code splitting config (@julienben)
process.noDeprecation = true(@spawnia)
- Miscellaneous fixes (@ngtan)