G
G
Georgy Kuznetsov2022-02-10 02:06:37
React
Georgy Kuznetsov, 2022-02-10 02:06:37

What are the reasons to not use componentWillMount in React?

You often hear recommendations not to use this method, even the creators of React themselves report this through the console.
So, what difficulties can arise when using this method?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir, 2022-02-10
@JoeSmith3100

Quote from offsite


Note:
These methods are considered legacy and you should avoid them in new code:
UNSAFE_componentWillMount()

https://reactjs.org/docs/react-component.html
Do you need to translate the word legacy ?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question