A little suggestion about API, it's related to the latest react hot reloading
joe-sky opened this issue · comments
Joe_Sky commented
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~