@chooks/use-network

1.0.0 • Public • Published

Usage

네트워크의 online/offline 상태를 업데이트하고 값을 반환한다.

const App = () => {
    const handleNetworkChange = (online) => {
      console.log(online ? "We just went online" : "We are offline");
    };
    const onLine = useNetwork(handleNetworkChange);
    return <div></div>;
  };

Readme

Keywords

Package Sidebar

Install

npm i @chooks/use-network

Weekly Downloads

1

Version

1.0.0

License

ISC

Unpacked Size

1.71 kB

Total Files

4

Last publish

Collaborators

  • chchaeun