Skip to content

Commit

Permalink
Getting ready for release (react-boilerplate#2625)
Browse files Browse the repository at this point in the history
* Dependency updates

* Sync hook test between template and internal apps

* Full changelog for v4

* Markdown syntax and release date

* Minor changelog update

* Tentative fix for Appveyor+Stylelint

* Another tentative fix for Appveyor+Stylelint

* Small dep upgrade

* Small dep update
  • Loading branch information
julienben authored Apr 18, 2019
1 parent ae658b3 commit c0d0788
Show file tree
Hide file tree
Showing 5 changed files with 404 additions and 147 deletions.
68 changes: 68 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,73 @@
# Changelog

## RBP v4: "The One With Hooks (And Much More)" Edition (April 2019)

### News

React Boilerplate v4.0.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 `React.lazy` and `Suspense` for component lazy-loading instead of an external library.
- We've added `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.)
- The generators don't support classes anymore. The `PureComponent` vs `Component` choice was replaced with an option to wrap your component inside `React.memo`.
- After much deliberation, `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.
- Following the release of React Hooks, it's become even clearer that `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!

### Main

- **Remove `Immutable.js` in favor of `Immer`** (**@julienben**, **@robertaird**)
- **Migrate from `enzyme` to `react-testing-library`** (**@mensae**)
- New instructions for snapshot and behavior testing
- **Embracing Hooks** (**@julienben**)
- Add `eslint-plugin-react-hooks`
- Migrate all class components to functions
- Add `useInjectSaga` and `useInjectReducer` hooks
- Remove generator options to extend `Component` or `PureComponent`. Replace with a `React.memo` option.
- **Use `React.lazy` and `Suspense` instead of `loadable-components` to code-split and asynchronously load components** (**@julienben**)

### Documentation updates

- Update Heroku deployment instructions (**@TheAncientGoat**)
- Add subfolder deployment instructions (**@nshimiye**)
- Add AWS EB deployment instructions (**@Al-un**)
- Spelling and grammar fixes (**@khayyamsaleem**, **@ngtan**)

### Internals updates

- Many dependency updates including: (**@julienben**)
- react and react-dom (`16.6` to `16.8.6`)
- react-redux (`5` to `7`) (**@bumi001**, **@jwinn**)
- connected-react-router (`4` to `6`)
- react-router-dom (`4` to `5`)
- redux-saga (`0.16` to `1`)
- sanitize.css (`4` to `8`)
- Update default saga injection mode to DAEMON (**@howardya**)
- Update generators to reflect all the stack changes
- Migrate default Node version to `lts/dubnium` (**@julienben**)
- Fix support for `stylelint` (**@jwinn**)
- Fix setup script for Windows environments (**@mensae**)
- Generate passing tests for components/containers (**@mjhost**)
- Rewrite generators code (**@mensae**)
- Complete rewrite or `generate-templates-for-linting.js` (**@mensae**)
- `webpack.DefinePlugin` => `webpack.EnvironmentPlugin` (**@nshimiye**)
- New Webpack code splitting config (**@julienben**)
- Remove `process.noDeprecation = true` (**@spawnia**)
- Miscellaneous fixes (**@ngtan**)

### Project maintenance

- Switch from Gitter to Spectrum (**@gretzky**)
- Update Code of Conduct and Contribution Guidelines (**@julienben**)
- New Issue Templates (**@gretzky**)
- New bots to help with issue management (**@gretzky**)
- Better recognition of contributors via adherence to [All Contributors](https://allcontributors.org/) specification (**@julienben**)

## 3.7 October 2018

### News
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ There’s also a <a href="https://vimeo.com/168648012">fantastic video</a> on ho

## Quick start

1. Make sure that you have Node.js v8.10 and npm v5 or above installed.
1. Make sure that you have Node.js v8.15.1 and npm v5 or above installed.
2. Clone this repo using `git clone --depth=1 https://github.com/react-boilerplate/react-boilerplate.git <YOUR_PROJECT_NAME>`
3. Move to the appropriate directory: `cd <YOUR_PROJECT_NAME>`.<br />
4. Run `npm run setup` in order to install dependencies and clean the git repo.<br />
Expand Down
4 changes: 2 additions & 2 deletions app/utils/tests/injectSaga.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,12 @@ describe('useInjectSaga hook', () => {

it('should eject on unmount with a correct saga key', () => {
const props = { test: 'test' };
const renderedComponent = renderer.create(
const { unmount } = render(
<Provider store={store}>
<ComponentWithSaga {...props} />
</Provider>,
);
renderedComponent.unmount();
unmount();

expect(injectors.ejectSaga).toHaveBeenCalledTimes(1);
expect(injectors.ejectSaga).toHaveBeenCalledWith('test');
Expand Down
Loading

0 comments on commit c0d0788

Please sign in to comment.