gaearon / gaearon/react-hot-loader

inconsistent documentation

Open
#1,334 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
12.2k
Forks
775
PR merge metrics
No merged PRs in 30d

Description

Getting started section says:

```
Make sure react-hot-loader is required before react and react-dom:
- or import 'react-hot-loader' in your main file (before React)
- or prepend your webpack entry point with react-hot-loader/patch, for example:
// webpack.config.js
module.exports = {
entry: ['react-hot-loader/patch', './src'],
// ...
};
If you need hooks support, use @hot-loader/react-dom
```

On the other hand migrate from create-react-app section doesn't care about order of the import or `@hot-loader/react-dom`.

Also when I asked @theKashey on twitter about the state of hooks support, he answered that they should "just work" out of the box.

Before I provide a PR, can somebody confirm that

1) order of the import doesn't matter, prepend is not needed
2) docs from create-react-app section are more valid than latest one
3) no additional tweaks via setConfig usually are needed

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.