gaearon / gaearon/react-hot-loader

Remount failed components on Error.

Open
#1,179 0 comments 0 reactions 0 assignees View on GitHub
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

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.