Open jEnbuska opened 5 years ago
Would it be technically possible for this library to support hooks?
Example usage:
const MyStickyComponent = () => { const {ref, style} = useSticky({top: 0, left: 0}); return ( <div ref={ref} style={style}> {/* ... */} </div> ) }
This would be a dramatically new API, it's possible on a technical level but it'd be a significant change. There would still need to be a StickyContainer somewhere in the render tree, as well.
StickyContainer
Would it be technically possible for this library to support hooks?
Example usage: