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 placed the same component multiple times on my page but I'm only mounting one of them (dependent on viewport)
When I make changes to the component's file I expect only the mounted component to be updated.
However it seems hot-reload tries to (re)mount all tags of that component on the page what causes the following error:
TypeError: Cannot read property 'unmount' of undefined
I'm using hot-reload in combination with webpack-loader
I've placed the same component multiple times on my page but I'm only mounting one of them (dependent on viewport)
When I make changes to the component's file I expect only the mounted component to be updated.
However it seems hot-reload tries to (re)mount all tags of that component on the page what causes the following error:
Some debugging showed me that
oldTag
isundefined
when it's getting reloaded without being mounted before.Therefore I'd suggest to simply check if oldTag isn't undefined before trying to unmount it
https://github.com/riot/hot-reload/blob/master/src/index.js#L19
@GianlucaGuarini what do you think?
The text was updated successfully, but these errors were encountered: