On react native, I am trying to use 'ddp-client' node library to connect to a meteor server. Just after the connection is successful, I am getting the following ERROR on client side:
2016-01-17 16:14:15.992 [trace][tid:com.facebook.React.JavaScript] ddp message: {"msg":"connected","session":"PGLBqgvoeuXgBtke2"}
2016-01-17 16:14:16.007 [warn][tid:com.facebook.React.JavaScript] process.nextTick is not a function. (In 'process.nextTick(function(_this){
return function(){
return _this._flush();};}(
this))', 'process.nextTick' is undefined)
2016-01-17 16:14:16.008 [error][tid:com.facebook.React.RCTExceptionsManagerQueue] Unhandled JS Exception: process.nextTick is not a function. (In 'process.nextTick(function(_this){
return function(){
return _this._flush();};}(
this))', 'process.nextTick' is undefined)
process.nextTick
doesn't exist on React Native so we've got to polyfill it. That is as simple as process.nextTick = setImmediate
.
You'll want to make sure you do this in your root component file (eg index.ios.js)
Hope this helps you!