V
V
Vitaly2017-06-06 11:25:31
JavaScript
Vitaly, 2017-06-06 11:25:31

Calling componentDidMount in React components when describing in functional style?

Hello.
The use of componentDidMount when describing a component through a class is obvious and straightforward.
How do adherents of the functional style of building react components get access to built-in methods?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Khmyrov, 2017-06-06
@vshvydky

No way, if you need state or lifecycl methods, then you should use a class, not a stateless component

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question