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

[discussion] Functional components & hooks #2438

Closed
amass01 opened this issue Mar 7, 2020 · 2 comments · Fixed by #3331
Closed

[discussion] Functional components & hooks #2438

amass01 opened this issue Mar 7, 2020 · 2 comments · Fixed by #3331

Comments

@amass01
Copy link
Member

amass01 commented Mar 7, 2020

I've discussed privately with @vctt94 on matrix, and we thought opening a discussion issue would be the best way to go here, to get more opinions about it.

We would like to use functional components & hooks in decrediton to improve maintainability - many class components life-cycle hooks will be deprecated soon and functional components is the way in modern react apps.

Of course such change will lead a huge refactor but of course if can be done incrementally (e.g page by page).

If we get green light to implement this I'd love to contribute to the efforts to make it happen.

@vctt94
Copy link
Member

vctt94 commented Mar 7, 2020

I believe it is a good step updating our code basis towards react last updates. As we can see react is clearly going through this direction and each time working less with classes.

The good part is that we don't need a rush to update everything at once, so I believe we can start updating some small components and we can see how it goes.

But I'd rather wait and see @alexlyp and @matheusd 's opinions, before starting any work

@matheusd
Copy link
Member

Seems reasonable. A quick spot check shows that most class-based components use it just to handle internal state changes, so it shouldn't be too bad.

This was referenced Jan 23, 2021
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

Successfully merging a pull request may close this issue.

3 participants