2.0.0 • Published 5 years ago

use-window v2.0.0

Weekly downloads
11
License
ISC
Repository
github
Last release
5 years ago

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>
  );
}
1.0.7

5 years ago

2.0.0

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago