in React JS by
Q:
What is getSnapshotBeforeUpdate method?

▼ Show 1 Answer

0 votes
by

 Executed right before rendered output is committed to the DOM. Any value returned by this will be passed into componentDidUpdate(). This is useful to capture information from the DOM i.e. scroll position.

React JS
Learn More with Madanswer

Related questions

0 votes
asked Jul 2, 2019 in React JS by Venkatshastri
...