You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've run into issues several times that are caused by calling cleanup functions during the rendering phase. First time in the UI library (a similar case is described here #4222). The second time with a library that prohibits data modification at the rendering stage.
It would be nice for React compatibility and to prevent problems like this to call cleanup functions on hooks after rather than during rendering.
The text was updated successfully, but these errors were encountered:
Yes, you are right. I'm talking about calling the cleanup function of a child component while rendering the parent, if the child component is unmounted. The timing of the call is different from React and this sometimes causes problems.
Describe the bug
I've run into issues several times that are caused by calling cleanup functions during the rendering phase. First time in the UI library (a similar case is described here #4222). The second time with a library that prohibits data modification at the rendering stage.
It would be nice for React compatibility and to prevent problems like this to call cleanup functions on hooks after rather than during rendering.
The text was updated successfully, but these errors were encountered: