Closed GHEMID-Mohamed closed 7 years ago
components written as functional stateless components don't have lifecycle hooks.
You'll need to do the class YourComponent extends React.Component...
pattern for creating components that you want to have lifecycle hooks for.
Alternatively, you can use Recompose's lifecycle hoc.
Why do you need to use componentWillMount anyways? What do you need to accomplish that can't be done w/ the initialize effect?
@Jascha-Sundaresan Thank you I solved the problem with initialize effect, it's just that documentation is not clear enough, but I'm impressed with your way for managing states in react app :+1:
Continue to improve this library :+1:
can this be closed @HamadaBrest?
@Jascha-Sundaresan Yes of course :) thank you
Does components that you have used in documentation extend from React Component ? Because I can't set the componentWillMount() !