New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details → →
Socket
Book a DemoSign in
Socket

use-window

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

use-window

Setting variables to the window with a awesome react hook.

latest
Source
npmnpm
Version
2.0.0
Version published
Maintainers
1
Created
Source

Downloads Version Issues

Setting variables to the window with an awesome react hook 🎣

Example:


import React from "react";
import useWindow from "use-window";

export default function App() {
  const [count, setCount] = useWindow("count", 0);
  return (
    <div className="App">
      <h1>{count}</h1>
      <h1>{window.count}</h1>
      <button onClick={() => setCount(count + 1)}>increment</button>
    </div>
  );
}

Keywords

use

FAQs

Package last updated on 15 Jan 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts