Although dynamically changing primary and bottomTabs is an unlikely app scenario, it probably happens a lot when building a scene. Don’t want to have to do a full reload when coding up a scene. Unless props can all be dynamically changed, can’t support hot reload.
Sure that dynamically adding, removing or replacing children worked once. Could’ve lost it when adding RTL on Android, freezing tabs or supporting Fabric.
There’s definitely Fabric problems with Suspense when changing children. React Native gets into an infinite loop where it keeps running the same mount state update. Worked around this by delaying the freeze on Fabric.
Added a jsUpdate check to avoid sending the tabSelected event back to React if it came from React in the first place. This seemed to prevent a Fabric/Suspense infinite loop. But it’s also just a good thing to do because React Native does something similar for its controlled props. Avoids infinite loop potential when changing the tab twice in quick succession from js.
Although dynamically changing
primary
andbottomTabs
is an unlikely app scenario, it probably happens a lot when building a scene. Don’t want to have to do a full reload when coding up a scene. Unless props can all be dynamically changed, can’t support hot reload.Sure that dynamically adding, removing or replacing children worked once. Could’ve lost it when adding RTL on Android, freezing tabs or supporting Fabric.
There’s definitely Fabric problems with Suspense when changing children. React Native gets into an infinite loop where it keeps running the same mount state update. Worked around this by delaying the freeze on Fabric.
Added a
jsUpdate
check to avoid sending thetabSelected
event back to React if it came from React in the first place. This seemed to prevent a Fabric/Suspense infinite loop. But it’s also just a good thing to do because React Native does something similar for its controlled props. Avoids infinite loop potential when changing the tab twice in quick succession from js.