Wildhoney / ReactShadow

:beginner: Utilise Shadow DOM in React with all the benefits of style encapsulation.
https://react-shadow.herokuapp.com/
MIT License
1.29k stars 80 forks source link

Import useEnsuredForwardedRef as standalone #153

Closed lightningspirit closed 1 year ago

lightningspirit commented 1 year ago

This commit removes the need to import react-use package as dependency, which reduces the bundle size in 0.5MB (npm reports).

Since the only function that is used is useEnsuredForwardedRef it was imported directly as a standalone js file into src/hooks directory.

Closes #152

Wildhoney commented 1 year ago

Nice, thanks :)