Closed Madhu94 closed 4 years ago
Can you describe more of what you mean, perhaps with a hypothetical example use case?
There's really no use case other than a slight boost to developer productivity. I wondered if something like https://github.com/gaearon/react-hot-loader existed for developing with @phosphor/widgets - where editing a widget reloads its code in the browser, without having to refresh the page.
I think that would be hard to do, for the same reason you shouldn't load two instances of Phosphor on the page at the same time. It breaks the instanceof
operator and some other assumptions made throughout the library. Since you can't remove objects which have already been loaded into the JS engine, this would cause multiple versions of Phosphor to get loaded on the page.
Makes sense. Thanks !
Is it possible to do this currently ?
If it hasn't been done because no one got to it, or if we don't know if this is even possible, I'd like to explore this space.
Something makes me feel it may not be feasible since phosphor is very different from other virtual dom based UI libraries like React and Vue, but I also don't know much about how HMR works to comment on that.