Skip to content

Commit

Permalink
Partial RN sync
Browse files Browse the repository at this point in the history
Summary:
This cherry-picks one commit: facebook/react@01fb68b

It fixes a bug in Fast Refresh.

Reviewed By: threepointone

Differential Revision: D17140543

fbshipit-source-id: a7654152d1cc7c27e7c4024380349b44ac496b22
  • Loading branch information
gaearon authored and grabbou committed Sep 4, 2019
1 parent c0fa590 commit eb0216d
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Libraries/Renderer/implementations/ReactFabric-dev.fb.js
Expand Up @@ -11122,6 +11122,11 @@ function renderWithHooks(
do {
didScheduleRenderPhaseUpdate = false;
numberOfReRenders += 1;
{
// Even when hot reloading, allow dependencies to stabilize
// after first render to prevent infinite render phase updates.
ignorePreviousDependencies = false;
}

// Start over from the beginning of the list
nextCurrentHook = current !== null ? current.memoizedState : null;
Expand Down
5 changes: 5 additions & 0 deletions Libraries/Renderer/implementations/ReactFabric-dev.js
Expand Up @@ -11118,6 +11118,11 @@ function renderWithHooks(
do {
didScheduleRenderPhaseUpdate = false;
numberOfReRenders += 1;
{
// Even when hot reloading, allow dependencies to stabilize
// after first render to prevent infinite render phase updates.
ignorePreviousDependencies = false;
}

// Start over from the beginning of the list
nextCurrentHook = current !== null ? current.memoizedState : null;
Expand Down
Expand Up @@ -10699,6 +10699,11 @@ function renderWithHooks(
do {
didScheduleRenderPhaseUpdate = false;
numberOfReRenders += 1;
{
// Even when hot reloading, allow dependencies to stabilize
// after first render to prevent infinite render phase updates.
ignorePreviousDependencies = false;
}

// Start over from the beginning of the list
nextCurrentHook = current !== null ? current.memoizedState : null;
Expand Down
5 changes: 5 additions & 0 deletions Libraries/Renderer/implementations/ReactNativeRenderer-dev.js
Expand Up @@ -10695,6 +10695,11 @@ function renderWithHooks(
do {
didScheduleRenderPhaseUpdate = false;
numberOfReRenders += 1;
{
// Even when hot reloading, allow dependencies to stabilize
// after first render to prevent infinite render phase updates.
ignorePreviousDependencies = false;
}

// Start over from the beginning of the list
nextCurrentHook = current !== null ? current.memoizedState : null;
Expand Down

0 comments on commit eb0216d

Please sign in to comment.