-
-
Notifications
You must be signed in to change notification settings - Fork 90
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
Render props pattern usage #105
Comments
It's an interesting concept. Although we would have to make the Additional props could be applied to the div (outside of the expected SizeMe config props) - such as className/style etc, and we could even support a This could be just a special component that encapsulates the existing API. Are you happy to experiment in creating this wrapper component? And then we could look at incorporating it if we found it useful. |
could |
Yeah, that sounds like an option. 😀 I would love for us to explore this more. Are you up for starting up a PR? |
I am! |
Awesome! Shout if you need anything. 😊 |
actually I might have spoken too soon, I'm going to take a look at https://github.com/souporserious/react-measure first, as it seems to support this format already and we have other components that also use it already. Not that I'm against helping out, it just might not be right away 😊 |
Started to flesh out an API: https://codesandbox.io/s/oxkw6xv4z6 |
Published a new version including a render props pattern based component 🎉 |
Have you ever considered having sizeMe work where you use a
<SizeMe>
component and it passes the size down as a prop? I think this method feels a bit more readable. ReactMotion does something like this.The text was updated successfully, but these errors were encountered: