in React JS by
Q:
What is getSnapshotBeforeUpdate method?

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.

Related questions

0 votes
asked Jul 2, 2019 in React JS by Venkatshastri
0 votes
asked Jun 19, 2020 in React JS by JackTerrance
...