Closed rgoldiez closed 8 years ago
Interesting. querystring is a native node module so it would need to be replaced along with any other native node modules to make it work without a compilation step. Can't you use something like browserify to create a web-safe bundle?
From what I've read, you would probably want to use React Packager....
https://github.com/facebook/react-native/blob/master/packager/README.md
...although packager doesn't seem to have a web-safe fallback system like Browserify or Webpack. Related issue...
https://github.com/facebook/react-native/blob/master/packager/README.md
querystring
is just one issue to resolve. Any dependencies and sub-dependencies all the way down the dependency tree needs to be addressed. For example, nforce
relies heavily on request
which leverages many node-core modules like stream
.
This is where Browserify and Webpack shine. They fix this for you when you create your bundles. I'm not sure how Webpack does this but Browserify has a fallback system to compatible npm modules when it can.
I'm thinking that the solution might be to "build" nforce into a bundle that doesn't rely on any node core modules.
@duncanfinney might have some ideas.
@kevinohara80 - I agree with your last post. I tried crawling the dependencies and sub-dep tree and it's a rat hole. An nforce
bundle that doesn't rely on core node would be great ... even if it was a slim down version just to get rolling.
Closing this issue. Salesforce mobile SDK 4.0 supports react native.
I've been using
nforce
in a couple of node.js apps and it works great. Any plans to support React Native? I've tried the simplevar nforce = require('nforce')
and React Native throws a bunch of dependency errors (no, simply installing the dependencies doesn't resolve it). See below for one such error: