Compared to Webpack, Parcel's paradigm is to use your HTML file as the entry point, not merely the main script:
¶ HMR (Fast Refresh)
Parcel has first-class support for React Fast Refresh (which supersedes react-hot-loader, a userland plugin that botched HMR support onto React). It is (in most cases) able to retain state between reloads (even after an error).
For further information, take a look at the official documentation.
¶ Selected Limitations
¶ State in class components is reset between reloads
With class components slowly being deprecated, their state will not be preserved.
¶ Declaring a Default Export Using a Function Expression Isn't Recognized
Editing this component would reset
value because the Fast Refresh Babel plugin cannot instrument the default export declaration.
¶ Exporting Values That Are Not Components Will Reset the State:
Component would reset the
value state, because of the other non-component export.
¶ Modifying the Asset That Calls Render Will Reset All State:
App will call
(The HMR functionality is provided by