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.js + React Native: Abstracting platform differences away #54

Closed
SanderSpies opened this issue Feb 8, 2015 · 2 comments
Closed
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@SanderSpies
Copy link

Are there any plans on abstracting platform differences away?

For React.js I use React.findDOMNode, but also offsetLeft, offsetWidth, etc. Obviously these won't work inside React Native - so I was wondering if this is just how things are, or if there is some plan for abstracting this away?

@vjeux
Copy link
Contributor

vjeux commented Feb 8, 2015

For measurement, we have an asynchronous API (we can't have anything synchronous in React native), that we designed to be polyfill-able in the browser. Ideally we want React Native to be a (good) subset of the browser. But in this case, since the browser doesn't have an API we came up with our own.

@vjeux
Copy link
Contributor

vjeux commented Feb 8, 2015

For React.findDOMNode(), we have this.refs.blabla.getNodeHandle() that you can use to communicate with native.

We want to converge the two at some point.

@vjeux vjeux closed this as completed Apr 1, 2015
harrykiselev pushed a commit to harrykiselev/react-native that referenced this issue Aug 5, 2015
Remove duplicate Dispatcher code in examples
@facebook facebook locked as resolved and limited conversation to collaborators May 29, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

3 participants