4 ms·
I have a hard time seeing how lifecycle identifiers could be called "arbitrary" except perhaps (again) from an "under the hood" viewpoint. From an API standpoin
by dabernathy89 7y ago
I have a hard time seeing how lifecycle identifiers could be called "arbitrary" except perhaps (again) from an "under the hood" viewpoint. From an API standpoint they are explicit and extremely simple.
I don't have anything against hooks except the API. There is no way for someone who isn't intimate with the ecosystem to understand the difference between these:
useEffect(() => {
document.title = foo;
}, [foo]);
useEffect(() => {
document.title = foo;
});
useEffect(() => {
document.title = foo;
}, []);
Whereas anyone can understand `componentDidUpdate`, `componentDidMount`, `componentWillUnmount` just by reading them.