F
F
fake3642019-11-02 14:09:03
React
fake364, 2019-11-02 14:09:03

If not in componentwillmount, then where is the ajax?

Guys, I'm new in React, I can't understand.. If componentWillMount is deprecated, then how not to initialize the component with data from some api, for example, where does the ajax request go?
In componentDidmount, it was not recommended to change states (article on Habré)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0xD34F, 2019-11-02
@fake364

https://ru.reactjs.org/docs/faq-ajax.html#where-in...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question