nars
nars copied to clipboard
Proper hot reloading using react fresh/react-refresh
Currently there's a simplistic hot-reloading implementation. On an edit to a file on the server:
- server is killed
- The connection between client and server is killed
- client polls until server is available again
- client makes a request for the currently shown component
- server renders the component from scratch
It's good enough but it's a little bit slow. If we incorporate react-refresh it should work quite better - it wouldn't require rerunning the server which takes a considerable amount of time. This is obviously to be investigated but it should be a big productivity gain.