Answer the question
In order to leave comments, you need to log in
What is the best approach to take when writing React code?
Good afternoon. I'm starting to learn React. Prior to that, he worked in Angular Js, Angular.
There are several questions, help to get answers to them:
1) There is a functional method of writing code and a class one. I read that classes should be abandoned in favor of functions. The official documentation describes the functional and class methods. How to use it?
2) What to use to update data - props (from parent to child) Redux, Flux or abandon everything and use hooks? (I read that state's should be avoided...)?
Perhaps I "mixed" here in terms ... I would be grateful for clarifications, I really want to choose the "right course", because I see that there are quite a few approaches to writing code.
Answer the question
In order to leave comments, you need to log in
The library is actively developing, each new solution is designed to improve and solve the problems of the previous one. Currently, hooks are the most progressive option. And all libraries are quite actively switching to them.
So if you want to create fresh and new - take them, it will be longer possible not to rewrite for something new :)
I read that classes should be abandoned in favor of functions
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question