Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for React Hooks #280

Open
jEnbuska opened this issue Mar 14, 2019 · 1 comment
Open

Support for React Hooks #280

jEnbuska opened this issue Mar 14, 2019 · 1 comment

Comments

@jEnbuska
Copy link

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>
   )
}
@vcarl
Copy link
Contributor

vcarl commented Apr 22, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants