Will it be Possible to Load RCTRootView Content Synchronously in Fabric? #25085
Labels
Bug
Ran Commands
One of our bots successfully processed a command.
Resolution: Locked
This issue was locked by the bot.
There’s a technical issue with React Native that affects navigation libraries using the underlying native API on iOS. I’m hoping that Fabric will solve the problem.
The problem arises when you try to write React components that change the appearance of the navigation bar. For example, I’m writing a component that adds a search bar to the navigation bar. In the native view I create a
UISearchController
and assign it to thenavigationItem
of the newUIViewController
. But when I add the component to a scene, the search bar doesn’t show up.iOS expects all changes to the navigation bar to be made during the view-loading phase. Changes made after this (while animating to the new UIViewController) don’t appear. Because of React Native’s asynchronous nature, the view content isn’t created in the view-loading phase and so the
didMoveToWindow
of theSearchBarView
fires too late to make changes to the navigation bar.Will it be possible in React Native Fabric to load the initial rendered content synchronously, i.e., will the init of the
RCTRootView
include the rendered content?React Native version:
N/A
Steps To Reproduce
UISearchController
to the navigation barThe text was updated successfully, but these errors were encountered: