mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Partial RN sync
Summary: This cherry-picks one commit: https://github.com/facebook/react/commit/01fb68b9bf680ab8bbf96e86501e0fc540b3cc97 It fixes a bug in Fast Refresh. Reviewed By: threepointone Differential Revision: D17140543 fbshipit-source-id: a7654152d1cc7c27e7c4024380349b44ac496b22
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user