From cf75d032d0e92812128227b7203aaa9e3a96ced7 Mon Sep 17 00:00:00 2001 From: Samuel Susla Date: Fri, 19 Apr 2024 11:02:54 -0700 Subject: [PATCH] disable event loop (#44169) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/44169 ## Changelog: [General][Changed] Disable new event loop behavior when bridgeless (new architecture) is enabled. # What is the problem With event loop, specifically with `batchRenderingUpdatesInEventLoop`, prop change is not delivered to Android mounting layer if the prop change was initiated from state update inside of `useLayoutEffect`, `componentDidMount` or `componentDidUpdate`. Note this has to be a prop change affecting mounting layer directly, not something consumed by Yoga, e.g. background colour or border colour. This affects android only. Minimal repro : ``` import React, {useLayoutEffect, useState} from 'react'; import {Button, SafeAreaView, View} from 'react-native'; function Foo() { const [bgColor, setBgColor] = React.useState('red'); useLayoutEffect(() => { console.log('useLayoutEffect'); setBgColor('blue'); }, []); return ( ); } function RNTesterApp() { const [show, setShow] = useState(false); return (