useIsClient
Safely determine if code is running on the client.
Usage Example
1import { useIsClient } from '@danixsoft/hooks';
2
3function Example() {
4 const isClient = useIsClient();
5
6 return <div>Client: {isClient ? 'Yes' : 'No'}</div>;
7}Safely determine if code is running on the client.
1import { useIsClient } from '@danixsoft/hooks';
2
3function Example() {
4 const isClient = useIsClient();
5
6 return <div>Client: {isClient ? 'Yes' : 'No'}</div>;
7}