one
one copied to clipboard
One throws `React state update on a component that hasn't mounted yet` when using Tab navigator with more then one tab
When I create a new One project using One 1.1.392 I am getting a React error when using the tab navigator.
- Clone the reproduction repo
-
npm i- You may need to add the
--forceflag as the default one template with npm has been giving me issues recently
- You may need to add the
-
npm run dev - Open in Expo Go
- You should see the following error
[error] Can't perform a React state update on a component that hasn't mounted yet. This indicates that you have a side-effect in your render function that asynchronously later calls tries to update the component. Move this work to useEffect instead. {"name":"Component Stack"}
Interestingly, if I only register one <Tab.Screen /> I don't get the error, but as soon as I add the second I see the error.
Try updating to the latest version of 'one'. That fixed this exact issue for me.
@justinmclaren I still see the error. Also glanced at the commits and I don't think I saw any change to the tab navigation, though I might be wrong about that part.