componentWasMounted/componentWasUpdated (formerly componentDidDisplay)
See original GitHub issueProposal: New life-cycle that fires after componentDidMount
and after the event-loop has returned but before any other reconciliation has started.
Effectively, this give you a componentDidMount
that doesn’t block the visual output. It could be a good place to set up timers, subscriptions etc.
Issue Analytics
- State:
- Created 8 years ago
- Reactions:2
- Comments:23 (12 by maintainers)
Top Results From Across the Web
React.Component
An update can be caused by changes to props or state. These methods are called in the following order when a component is...
Read more >javascript - React Warning: Can only update a mounted or ...
Warning: Can only update a mounted or mounting component. This usually means you called setState, replaceState, or forceUpdate on an unmounted ...
Read more >Fetching Data and Updating State in a React Class | Pluralsight
The componentDidMount method is a great place to request data from the server since even though setting the state will cause a second...
Read more >React lifecycle methods: An approachable tutorial with examples
Learn all about React lifecycle methods for mounting, updating, unmounting, and error handling, including new methods as of React 17.
Read more >React 16 Lifecycle Methods: How and When to Use Them
A revised and up-to-date guide to the new React component lifecycle ... into four sections: mounting, updating, unmounting, and errors.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This is basically what
useEffect
is.A
componentDidRender
lifecycle method would be interesting, for browser|native|* specific patches 👍