2
Is it a default behaviour? : YES, it is. This is known as live-reloading where a change in your file refreshes your local server and restarts the app setting all state to initial ones. But the problem as you mentioned is that the state of the app is lost. There is another concept called hot-reloa...