Reputation: 594
From my parent react component's render method I am creating a list of child radio button components.
I need to call a method once the render is completed, i.e., children components are also rendered completely.
I tried following mechanism:
I am passing all the data through props to parent -> child and there is no redux involved.
How I can achieve this ?
Upvotes: 2
Views: 3214
Reputation: 10906
simply wrap in a timeout in the parent component's componentDidMount
componentDidMount() {
setTimeout(this.myMethod, 1000/60)
}
componentDidUpdate
is not invoked on the initial render, hence you cannot use it.
Upvotes: 1