Skip to content

Commit

Permalink
Make Limitations clearer to understand (#1472)
Browse files Browse the repository at this point in the history
* Fix grammar
* Fix typos
* Clarify the example
  • Loading branch information
solimant authored Jun 26, 2020
1 parent 5301dc8 commit e6035ec
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,13 +178,9 @@ Make sure to watch your bundle size when implementing react-hot-loader to ensure

## Limitations

* (that's the goal) React-Hot-Loader would not change the past, only update the present - no lifecycle event would be called on component update.
As a result - all the code changes, you may made among `componentWillUnmount` or `componentDidMount`, would be ignored for
already created components.
* (that's the goal) React-Hot-Loader would not change the past, only update the present - no lifecycle event would be called on component update. As a result, any code changes made to `componentWillUnmount` or `componentDidMount` would be ignored for already created components.
* (that's the goal) React-Hot-Loader would not update any object, including component `state`.
* (1%) React-Hot-Loader could not reply some changes you may made in components `constructors`. As long as
components would not be recreated - RHL have to _inject_ new data onto existing components, but there is no way to detect the actual change and the way reply it.
React-Hot-Loader knows what class method is, not how you created it. See [#1001](https://github.com/gaearon/react-hot-loader/issues/1001) for details.
* (1%) React-Hot-Loader may not apply some changes made to a component's `constructor`. Unless an existing component is recreated, RHL would typically _inject_ new data into that component, but there is no way to detect the actual change or the way it was applied, especially if the change was made to a function. This is because of the way React-Hot-Loader works - it knows what class functions are, not how they were created. See [#1001](https://github.com/gaearon/react-hot-loader/issues/1001) for details.

## Recipes

Expand Down

0 comments on commit e6035ec

Please sign in to comment.