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
Component3 is still the same, but yet again has a "named" Proxy.
The problem
You got 3 "same" components, which were the same only in the beginning, but now all are unique ProxyFacades.
React hot loader will call getProxyByType passing the type to get the proxy. And only one name is associated by type - the last one.
During the code splitting one could touch a new code and move "the last one" to a new "name", thus a new ProxyFacade.
Just next loading of async chunk will trigger sub render to reconcile trees, it will found "a very similar components", and update existing components... resulting unmount, as long component type did change.
The fix
Only one ProxyFacade should be created for any Component. Also doable if we will not .register variables at all, but it will break loadable-components HMR (@neoziro).
I am thinking about extracting type comparison from reconsiler and using it inside .register
The text was updated successfully, but these errors were encountered:
The code
Component1 and default export has the same types, but, was registered by different names twice.
Component3 is still the same, but yet again has a "named" Proxy.
The problem
You got 3 "same" components, which were the same only in the beginning, but now all are unique ProxyFacades.
React hot loader will call
getProxyByType
passing the type to get the proxy. And only onename
is associated by type - the last one.During the code splitting one could touch a new code and move "the last one" to a new "name", thus a new ProxyFacade.
Just next loading of async chunk will trigger sub render to reconcile trees, it will found "a very similar components", and update existing components... resulting unmount, as long component type did change.
The fix
Only one ProxyFacade should be created for any Component. Also doable if we will not
.register
variables at all, but it will break loadable-components HMR (@neoziro).I am thinking about extracting type comparison from reconsiler and using it inside .register
The text was updated successfully, but these errors were encountered: