gaearon / gaearon/react-hot-loader

RHL should detect wrong HRM

Open
#756 8 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
JavaScript
Stars
12.2k
Forks
775
PR merge metrics
No merged PRs in 30d

Description

Based on #753
If user has an async loaded component, and that component got not updated in terms of RHL(proxy) before `module.hot.accept` fired - RHL should detect and highlight the problem.

#### Current behavior
The element will be not updated on HRM. May be updated(or remounted) on page redraw (including next HMR event).

#### How
Store the current `generation` from AppContainer in each instance during construction/hotReplacementRender. Compare with actual value in ProxyComponent.render.

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.