I am interested in HMR (hot module reloading) for ink, so it can keep state and reload components on file-change. I'm not sure where to start. It seems like react-hot-loader is pretty focused on webpack & web-oriented workflows. Any suggestions would be welcomed.
Might be sort of related to #15
I started with a kind of naive approach, just to see if I could rerender on change.
I have a complete (no HMR) project here if you want to try it out.
I have an App that I want to fill the screen, and get re-rendered if a file changes (and eventually when terminal size changes.) I am using hooks and an HOC, because this illustrates how I will really use it.
stdout.rowsAppIt works fine to render App, but when a file changes, the screen goes blank.
Good idea! I'm currently focusing on resolving layout issues, but would certainly love to look into it later. Keep us posted with your progress!
Based on my investigation, HMR is only possible when you bundle with webpack or alike - something which majority of Ink-based CLIs don't.
I'm going to leave this issue open for visibility, but not planning to spend time on it myself for now.