Open
Description
Is your feature request related to a problem? Please describe.
With Fast refresh local state will be preserved for function components and Hooks out of the box
But RES local state inside function components will not, it would be great if the state was preserved!
Describe the solution you'd like
local state of RES being preserved by Fast refresh just like hooks are
Describe alternatives you've considered or seen elsewhere
none
Additional context
Here are some of the limitations of Fast refresh that i have learned:
- it will re-render a React component when we edit a module that exports only React components
- it will reload all React components that import a non-React module and the module itself, when we edit it
- it will do a full reload when we edit a module outside of the React tree
- it will continue working once we resolve a syntax or a runtime error without having to reload manually
- local state will be preserved for function components and Hooks out of the box
- local state won't be preserved for class components