Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

A little suggestion about API, it's related to the latest react hot reloading #13

Open
joe-sky opened this issue Apr 8, 2021 · 0 comments

Comments

@joe-sky
Copy link

joe-sky commented Apr 8, 2021

Hello, I think this project looks very cool~

I see that this library has an API to take custom hooks from the component props. In this way, with the react fast refresh hot reloading, the state of the sub component may be lost 馃槬.

This is because react fast refresh is implemented based on Babel. When parsing the custom hooks used by sub components, it will treat all the hooks as global functions by default, and ignore the local ones passed in from props. This is a problem that I have encountered in the development, I'd like to share it with you~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant