ZeeCoder / use-resize-observer

A React hook that allows you to use a ResizeObserver to measure an element's size.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Why is it suggested to instal as a dev dependency

hepiyellow opened this issue · comments

The README states:

yarn add use-resize-observer --dev
# or
npm install use-resize-observer --save-dev

Isn't it supposed to get built and run in the browser?

That is correct, that's how it's used.
It's all based on your setup: I worked with a lot of setup that had a Node.js backend and a frontend within the same repo, so dependencies were node's, while dev deps were the frontend's.

There's nothing "clever" done here, you do you. :)

Also see the discussion here:
#87