3 ms·
The main benefit for a developer, as far as I can tell, is that the state of the app is maintained between reloads. So you can interact with it — e.g., type int
by dcre 12y ago
The main benefit for a developer, as far as I can tell, is that the state of the app is maintained between reloads. So you can interact with it — e.g., type into an input, make selections in dropdowns — then change the code behind it and everything you did will still be there.
The site does say:
> React Hot Loader will keep it mounted, preserving the state.
but I agree that it could be more explicit about how it's useful.
- seanmcdirmid 12y agoYes, not losing state is a big deal. This is possible because the UI is stateless while React is a view on that state. We built a similar system (for TouchDevelop) in a PLDI paper a few years back: http://research.microsoft.com/pubs/189242/pldi097-burckhardt.pdf http://research.microsoft.com/pubs/189242/pldi097-burckhardt... From the paper, adding a navigability aspect between UI and executing code is something that is fairly straightfoward to do and very useful. My current live programming work is over stateful code (meaning the code that is being live edited involves side effects). It is difficult to support that in existing programming models, however.