streamich / react-use

React Hooks — 👍
http://streamich.github.io/react-use
The Unlicense
41.93k stars 3.16k forks source link

build size > 100k? make items importable from own file? #2504

Closed Morriz closed 1 year ago

Morriz commented 1 year ago

Can we make this import a bit smaller and allow something like:

import useMount from 'react-use/useMount'

Or is that already possible just not mentioned in the readme?

Morriz commented 1 year ago

closing as should be possible with

import { default as useMount } from 'react-use/lib/useMount'