gaearon / gaearon/react-hot-loader
Remount failed components on Error.
Open
- Dominant language
- JavaScript
- Stars
- 12.2k
- Forks
- 775
- PR merge metrics
- No merged PRs in 30d
Description
It's possible to cause an error during the hot update.
It should be possible to drop the existing state and remount failed tree branch from scratch.
Two possibilities:
1. Temporary set `proxies` to render "something different" instead of a target component (remounts everything "like" the failed one.
2. Traverse tree, looking for a failed one, and wipe it from a rendered tree.
In both cases, _wiping_ could start from a nearest Class-based component (ie ErrorBoundary).
Contributor guide
Assessment
This issue has not been assessed yet.