Closed kandros closed 1 month ago
By calling lazy inside the component body it tries to load It on every render causing remounting and suspense to trigger loading state again.
lazy
In this demo is not a problem cause the host doesn't rerender but It might be a cause of confusion
https://github.com/user-attachments/assets/8f119bda-a9c0-4bf7-8645-b93e96c1ba2a
https://github.com/user-attachments/assets/8286f18c-a900-4ef4-9f5b-fe72370e9553
By calling
lazy
inside the component body it tries to load It on every render causing remounting and suspense to trigger loading state again.In this demo is not a problem cause the host doesn't rerender but It might be a cause of confusion
Before
https://github.com/user-attachments/assets/8f119bda-a9c0-4bf7-8645-b93e96c1ba2a
After
https://github.com/user-attachments/assets/8286f18c-a900-4ef4-9f5b-fe72370e9553