@jharrilim/if-browser-component
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

If Browser

Will render children only in browser; useful for components that make use of window.

Example

import React from 'react';
import IfBrowser from '@jharrilim/if-browser';

const MyComponent = () => (
    <IfBrowser>
        <p>{window.innerWidth}</p>
    </IfBrowser>
);

Readme

Keywords

Package Sidebar

Install

npm i @jharrilim/if-browser-component

Weekly Downloads

0

Version

1.0.0

License

GPL-3.0

Unpacked Size

38.9 kB

Total Files

8

Last publish

Collaborators

  • jharrilim