- didMount — Equivalent to React’s componentDidMount. Called after the page renders for the first time.
- willUnmount — Equivalent to React’s componentWillUnmount. Called before the page unmounts.
Use Cases
The following example demonstrates how to use lifecycle hooks. Configure the page lifecycle functions in the action panel to perform these operations:- Listen for the document’s resize event after the page mounts.
- Output the current page width in real time via the onResize method.
- Remove the document’s resize event listener before the page unmounts.