- Updated all component headers and documentation
- Changed navbar and footer branding
- Updated homepage hero badge
- Modified page title in index.html
- Simplified footer text to 'Built with ❤️'
- Consistent V2 capitalization across all references
16 lines
376 B
JavaScript
16 lines
376 B
JavaScript
import { useRef } from 'react';
|
|
import { useIsomorphicLayoutEffect } from './use-isomorphic-effect.mjs';
|
|
|
|
function useIsMounted() {
|
|
const isMounted = useRef(false);
|
|
useIsomorphicLayoutEffect(() => {
|
|
isMounted.current = true;
|
|
return () => {
|
|
isMounted.current = false;
|
|
};
|
|
}, []);
|
|
return isMounted;
|
|
}
|
|
|
|
export { useIsMounted };
|