Answer the question
In order to leave comments, you need to log in
How is adding a lifecycle implemented in functional React components?
I would be grateful if someone could explain on the fingers how adding a life cycle to functional components in React works. Including how the React.useEffect and React.useState hooks are implemented. It is interesting exactly what patterns are used, what is remembered where and from where it is called.
And is it worth using such functional components with a life cycle, or is it already easier to create a class: which is more profitable in terms of memory?
Answer the question
In order to leave comments, you need to log in
Look here https://www.netlify.com/blog/2019/03/11/deep-dive-... it's well explained here, for performance here https://medium.com/@maafaishal/react-class- compone...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question