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

react-native support #115

Open
drcmda opened this issue Aug 11, 2018 · 3 comments
Open

react-native support #115

drcmda opened this issue Aug 11, 2018 · 3 comments

Comments

@drcmda
Copy link

drcmda commented Aug 11, 2018

reference: https://twitter.com/souporserious/status/1026811462721794048

I had no prior experience with RN as well and people were asking, but turned out it wasn't so hard eventually. create-react-native-app has an emulator out of the box. For react-spring i distribute a web builds (which is the default) and RN under /dist/native https://github.com/drcmda/react-spring/blob/master/rollup.config.js maybe it helps. From what you've said on Twitter, would onLayout be enough to fulfill react-meaure's requirements?

@souporserious
Copy link
Owner

This should be easier to do in V3 and I think the API can be the same. I'll play around with it this week and report back.

@greg-humiston
Copy link

greg-humiston commented May 8, 2019

Hey @souporserious, by any chance has there been any progress made on this? I'm currently using react-measure in a module that is used by both a web and native environment and am finding myself having to polyfill on native due to a type error ("node.getBoundingClientRect is not a function" via getContentRect) being thrown since 2.2.6. I'm using react-native v0.58.5.

@souporserious
Copy link
Owner

I haven't had a chance to look at this, but if you have any ideas here I would gladly accept a PR! I'm hoping we could have a similar API to either the current version or the V3 branch that points to a react-native specific export.

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

No branches or pull requests

3 participants