@phenomenon-hooks/use-is-client
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

useIsClient


Installation

yarn add @phenomenon-hooks/use-is-client

or

npm i @phenomenon-hooks/use-is-client

Usage

import React from 'react';
import { useIsClient } from '@phenomenon-hooks/use-is-client';

const Component: React.FC = () => {
    const isClient = useIsClient();

    return (
        <div>
            <p>Is client: {isClient ? 'yes' : 'no'}</p>
        </div>
    );
};

Anatomy

const isClient = useIsClient();

Returns

Return value Type Description
isClient boolean Is code running on client.

Readme

Keywords

none

Package Sidebar

Install

npm i @phenomenon-hooks/use-is-client

Weekly Downloads

1

Version

0.0.2

License

MIT

Unpacked Size

4.78 kB

Total Files

8

Last publish

Collaborators

  • mykola.kolomoyets