componentwill
ComponentWill is a JavaScript hook used in React applications to perform specific actions before a component unmounts or when it is removed from the React tree. The ComponentWill method is called when a component is about to be removed from the tree and was a part of the render pipeline in React's earlier versions.
In the update to React 17 and beyond, the ComponentWill method has been removed from React.js, and
The ComponentWill method accepts two parameters - componentWill: a function to be called before unmounting the component.
React developers should avoid using ComponentWill as much as possible for new components when moving to React
On deprecation, React advises against direct use of ComponentWill, and instead suggest using usefuleffect or componentDidUpdate