Replies: 1 comment
-
Have this issue as well. Causes a lot of lagging issues down the road when you have things like flatlists with a lot of elements, even using flashlist. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Main Issue
I noticed that my screen is triggering the initial useEffect twice. I was suspecting that some upper level component was unmounting and mounting again, but turns out that the _layout.tsx file is rendering more than once.
Details
My currently structure is the following:
Logs
When I reload my app and the router put me at the logged index, these were the renders that happened:
Why app/(app)/_layout.tsx rendered 3 times and app/(app)/home/ndex.tsx rendered twice?
I understand that the first render of the layout is related to the (app)/index that does the redirect. Another is related to the screen I was redirected to. But what about the third time? I also noticed that it is not being remounted because does not trigger the unmount of the useEffect.
My app/(app)/_layout.tsx for reference:
Beta Was this translation helpful? Give feedback.
All reactions