Changelog.md
React Boilerplate v4.0.0 is out and it's a doozy! Here are the highlights:
React.lazy and Suspense for component lazy-loading instead of an external library.useInjectSaga and useInjectReducer hooks 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.)PureComponent vs Component choice was replaced with an option to wrap your component inside React.memo.Immutable.js is finally gone. We've added Immer instead. With it, we can write very concise and readable reducers while sticking to native JavaScript data structures.react-testing-library is now the industry-standard for React DOM testing. Workarounds for the incompatibilities between enzyme and styled-components are 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.
Huge thanks to @Mensae, @gretzky, @jwinn and everyone who helped review or submit PRs! If I've forgotten your contribution in the credits below, please let me know.
We hope you enjoy this release and welcome any feedback, bug reports or feature suggestions you can send our way!
Immutable.js in favor of Immer (@julienben, @robertaird)enzyme to react-testing-library (@mensae)
eslint-plugin-react-hooksuseInjectSaga and useInjectReducer hooksComponent or PureComponent. Replace with a React.memo option.React.lazy and Suspense instead of loadable-components to code-split and asynchronously load components (@julienben)16.6 to 16.8.6)5 to 7) (@bumi001, @jwinn)4 to 6)4 to 5)0.16 to 1)4 to 8)lts/dubnium (@julienben)stylelint (@jwinn)generate-templates-for-linting.js (@mensae)webpack.DefinePlugin => webpack.EnvironmentPlugin (@nshimiye)process.noDeprecation = true (@spawnia)Welcome to a new React Boilerplate release with improvements aplenty, bug fixes and major dependency upgrades! Big thanks to @gretzky, @justingreenberg, @jwinn and everyone who helped review and submit PRs for this release!
For existing projects, the only way to upgrade from 3.6.0 is to manually apply the changes from #2403 to your project. Please be careful when doing so as it isn't officially supported and could break things on your end.
Next steps will include re-thinking immutability in the store (RFC @ #2092), re-organizing docs, saga improvements, smart bundling and plenty more. Please keep the PRs coming. And if you're up for it, remember that you can use the dev branch to test all the latest updates and report bugs!
Lots of additional documentation updates thanks to @doaboa, @cheickmec, @nicogreenarry, @sduquej, @diwakar-s-maurya.
Major version updates are finally here! It's been awhile, but we're a small team that's been pushing this for awhile. Thanks to several users' PRs, we were able to cherry-pick a lot from the dev branch to push this release out. We decided because of the amount of dependencies that needed to be updated- we would overshoot some of the changes made on the dev branch and just grab the most pressing ones.
Next steps for us will be revisiting the dev branch, revisiting outstanding PRs and RFCs (like Immutable), and also plugging away at a create-react-app spinoff for react-boilerplate.
--fix flag to eslint command (@shobhitchittora)import PropTypes to component generators (@GoldAnna)onRejected() from FontFaceObserver (@akarve)So, a few things have changed in the JS ecosystem since the original release of React Boilerplate, and there was a discussion in #1776 around the it's future. TLDR; we had two incompatible PRs — one for server-side rendering, and another for react-router v4. The community decided that we would keep our dependencies up to date (upgrade react-router) and establish a clear mission for React Boilerplate:
React Boilerplate is a rock-solid foundation for crafting large, high-performance enterprise-grade frontend web applications that have advanced/custom requirements.
We may include SSR in a future version, but for now this is our focus... create-react-app and next.js are doing an awesome job and strongly recommend these projects for most use cases.
asyncInjectors: improve code splitting/saga managementstyled-components to v2.x.x (@justingreenberg)babel-preset-hmre with vanilla Webpack HMR (@Dattaya)add-asset-html-webpack-plugin (@skidding)React.PropTypes to prop-types (@dennybiasiollsanitize.css (@Dattaya)react/no-array-index-key (@carloscuatin)Intl polyfill in language generator (@tmf)<List> component tests (@chaintng)onSubmitForm test into mapDispatchToProps test (@tomasfrancisco)app/routes (@beardedtim)store.js to configureStore.js to prevent conflict (@howardya)dev and prod middleware (@tomazy)package.json (@bt).otf file extension (@kachkaev)App into a functional component (@Dattaya)shelljs (@KarandikarMihir)manifest.json (@mrharel)Many fixes to documentation thanks to @Aftabnack, @auchenberg, @danielrob, @gregoralbrecht, @JonathanMerklin, @marciopuga, @NicholasAnthony, @Skaronator, and @vedatmahir
System.import to import()), thanks to @Dattayareact-boilerplate to the docs, massive thanks to @KarandikarMihirimport/first eslint rule and rewrite all imports, huge thanks to @KarandikarMihir--host parameter when running npm start, thanks to @ifedotovcreateStructuredSelector in the example, thanks to @Dattayanpm run pagespeed command and all related dependencies and files, thanks to @mkhazov.editconfig, thanks to @avdeevnpm run clean not working as expected, thanks to @adjnor.nginx.conf), thanks to @supergickoWelcome @KarandikarMihir to the team! Karandikar has been all over the repo, providing fixes and features. Happy to have him on board to make react-boilerplate even better!
Special thanks as always to @gihrig for diligently testing everything and keeping our dependencies up to date!
Also, huge props to @samit4me and @Dattaya for being everywhere and fixing so many issues and of course to @KarandikarMihir for all his hard work.
If you want to help us make react-boilerplate great, please use the dev branch, test all the things and report all the bugs!
This release was made possible by Fullstack React and Serverless! Want to support us too? Click here!
React Boilerplate (RBP) v3.0.0 is out, and it's a complete rewrite! :tada:
We've focused on becoming a rock-solid foundation to start your next project with, no matter what its scale. You get to focus on writing your app because we focus on making that as easy as pie.
website!
Scaffolding: Thanks to @somus, you can now run npm run generate in your
terminal and immediately create new components, containers, sagas, routes and
selectors! No more context switching, no more "Create new file, copy and paste
that boilerplate structure, bla bla": just npm run generate <thing> and go.
Oh... and starting a project got a whole lot easier too: npm run setup. Done.
Revamped architecture: Following the incredible discussion in #27 (thanks everybody for sharing your thoughts), we now have a weapons-grade, domain-driven application architecture.
"Smart" containers are now isolated from stateless and/or generic components, tests are now co-located with the code that they validate.
New industry-standard JS utilities We're now making the most of...
Huge CSS Improvements
Performance
Testing setup: Thanks to @jbinto's herculean efforts, testing is now a first-class citizen of this boilerplate. (the example app has 99% test coverage!) Karma and enzyme take care of unit testing, while ngrok tunnels your local server for access from anywhere in the world – perfect for testing on different devices in different locations.
New server setup: Thanks to the mighty @grabbou, we now use express.js to give users a production-ready server right out of the box. Hot reloading is still as available as always, but adding a custom API or a non-React page to your application is now easier than ever :smile:
Cleaner layout: We've taken no prisoners with our approach to keeping your code the star of the show: wherever possible, the new file layout keeps the config in the background so that you can keep your focus where it needs to be.
Documentation: Thanks to @oliverturner, this boilerplate has some of the best documentation going. Not just clearly explained usage guides, but easy-to-follow removal guides for most features too. RBP is just a launchpad: don't want to use a bundled feature? Get rid of it quickly and easily without having to dig through the code.
Countless small improvements: Everything, from linting pre-commit (thanks @okonet!) to code splitting to cross-OS compatibility is now tested and ready to go: