Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

One throws React state update on a component that hasn't mounted yet when using Tab navigator with more then one tab #400

Open
christianjuth opened this issue Jan 9, 2025 · 1 comment

Comments

@christianjuth
Copy link

christianjuth commented Jan 9, 2025

When I create a new One project using One 1.1.392 I am getting a React error when using the tab navigator.

  1. Clone the reproduction repo
  2. npm i
    • You may need to add the --force flag as the default one template with npm has been giving me issues recently
  3. npm run dev
  4. Open in Expo Go
  5. 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.

@justinmclaren
Copy link

Try updating to the latest version of 'one'. That fixed this exact issue for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants