4

I was going through React life -cycle method so a questions comes in my mind. SO Sharing here : Can we call react's render() function forcefully ?
as we call $apply() in angular JS

1
  • i don't think this question is answered, the answers give an alternate way to achieve the result but never explains why its not possible to call render manually Commented Apr 9, 2020 at 22:48

1 Answer 1

1

If you want to render a component you can use ReactDOM.render()
If you want to force a component to update you can use forceUpdate

Sign up to request clarification or add additional context in comments.

2 Comments

but can I call this.render() from any lifecycle method or any user defined method ?
@abhishek Rendering a component and calling the render method it's not the same thing. Updating a component implies call all lifecycle methods in order

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.