Child options are applied when a child appears, meaning it's attached to hierarchy.
Going over the Wix app crash logs, a few users experienced a crash where apparently
BottomTabs options were applied for a child component, and a corresponding tab wasn't found.
I'm not sure how this happens and wasn't able to reproduce the crash.
Hopefully I'll have more information in the future but for now I've added a simple check to ensure
options are applied only if a tab is found.
Add addtional common problem for cache reset (#3809)
When fresh installing `v2` branch some time getting issues with bundling. Due to `rn-packager` cache. Normal `npm start -- --reset-cache` was not working properly. So had to reset the cache manually. Maybe its because of the start script is different from regular react native app setup
Add YellowBoxed back to ReactRootViews before unmount
Apparently, UiImplementation doesn't like it when views disappear from hierarchy unexpectedly.
As yellow boxes are added to all ReactRootViews, we remove them from TopBar components.
When these components got unmounted, UiImplementation tried to remove the yellow box and since it
couldn't find it - it crashed.
This commit simply adds the yellow box before views are unmounted.
Unmount buttons when corresponding screen is unmounted
Currently buttons were unmounted each time a screen was pushed to the stack.
As we're clearing props when screens are unmounted from the prop store - when a screen
was popped to - its buttons's props were undefined.
This commit changes things so that buttons are unmounted when buttons are set
using mergeOptions and when the corresponding screen is unmounted.