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
In Remix projects we know for a while that even though flushSync is called in the dispatch flow, it is not guaranteed that Remix rendering happens synchronously.
That was the reason to enable the resize/mutation observers in select mode (see #5838 ), to make sure the dom walker is executed again after Remix rendering is ready.
However, it turned out that it also happens that all the project code renders asynchronously, and the canvas root container is not in the dom yet during the dispatch flow. (Even though that should only happen to parts of the app inside the Remix app (inside the Outlet))
Open root.js (e.g. by double clicking on the Outlet in the navigator
Edit the code and cause a build error like this:
Fix the code.
If you log the canvas root container element in resubscribeObservers (which is called in the dispatch flow), sometimes you will see that it is null even during the last dispatch after the code change. You may need to try it a few times and/or reload the project to try again.
We should be prepared for async rendering anyway, because user code can always trigger asynchronous renders (theoretically the mutation/resize observers are about that)
The text was updated successfully, but these errors were encountered:
In Remix projects we know for a while that even though flushSync is called in the dispatch flow, it is not guaranteed that Remix rendering happens synchronously.
That was the reason to enable the resize/mutation observers in select mode (see #5838 ), to make sure the dom walker is executed again after Remix rendering is ready.
However, it turned out that it also happens that all the project code renders asynchronously, and the canvas root container is not in the dom yet during the dispatch flow. (Even though that should only happen to parts of the app inside the Remix app (inside the Outlet))
How to reproduce:
If you log the canvas root container element in
resubscribeObservers
(which is called in the dispatch flow), sometimes you will see that it is null even during the last dispatch after the code change. You may need to try it a few times and/or reload the project to try again.TODO:
Notes:
The text was updated successfully, but these errors were encountered: