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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using Hooks to replace setState calls #27

Closed
borislit opened this issue Oct 29, 2018 · 2 comments
Closed

Using Hooks to replace setState calls #27

borislit opened this issue Oct 29, 2018 · 2 comments

Comments

@borislit
Copy link
Contributor

Today, when class components is refactored to the functional component, all setState calls are lost, as there was no equivalent concept. Today, after Hooks have been introduced, they seem to be just that.
It would be awesome to explore such a possibility.
This should be an opt-in feature (using configuration)

@itzsaga
Copy link

itzsaga commented Oct 30, 2018

When should this be explored? Hooks are still an early stage proposal and I think Dan said it best in this tweet https://twitter.com/dan_abramov/status/1057027428827193344

@borislit
Copy link
Contributor Author

@itzsaga I agree, and for this very reason what i was thinking was to have it as an "opt in" feature which you would turn on through a config parameter. Also, that also means that the code for that feature would have to be isolated.

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

No branches or pull requests

2 participants