-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
unstable_batchedUpdates undefined in React Native #127
Comments
@zpao What is the best approach here? |
This ties into the work that needs to be done to get react native all on board with react 0.14 and no longer providing their own override. (eg, you would do cc @spicyj @sebmarkbage who have been working on this. Not sure how far out that is, but perhaps React Native can just add |
Yes, the react-native package should expose that helper. |
@zpao Gotcha. Explains why I had to alias react to react-native to use relay. |
Ran into this issue when working through the react-treasurehunt example on Windows. I don't have a deep enough understanding to figure out why unstable_batchedUpdates is undefined, but I modifed
|
Ah, my particular issue is fixed in commit 2d82240. Note, this was unrelated to React Native. |
On React Native you'll temporarily need to add a file called ReactDOM.js: /**
* @providesModule ReactDOM
*/
'use strict';
var ReactUpdates = require('ReactUpdates');
// Temporary shim required for Relay.
var ReactDOM = {
unstable_batchedUpdates: ReactUpdates.batchedUpdates,
};
module.exports = ReactDOM; but I was under the impression that the open-source Relay package has a couple other problems before it can be used directly in React Native… |
@spicyj Very few. This was one of the main issues. I am successfully using relay with react-native. I use webpack so I aliased react to react-native. I also had to include https://github.com/johanneslumpe/react-native-browser-polyfill |
I'm not sure why you would need a |
It looks like the original issue is fixed. Feel free to reopen or file a new task if there's more to be done here (other than that covered by #26). |
I think RelayContainer depends on
React.unstable_batchedUpdates
which doesn't appear to be available under react-native. Instead it isReact.addons.batchedUpdated
.The text was updated successfully, but these errors were encountered: