2

I am making a React Native app that must fetch data from an SQL Server. I'll be doing many complicated joins and other SQL functions so I figured DreamFactory would be easier to use in this way.

DreamFactory is a RESI API automation platform for SQL or NoSQL databases that automatically generates APIs for Swift, JavaScript, Ionic, React, and more.

I found the DreamFactory SDK for React.js here: https://github.com/dreamfactorysoftware/reactjs-sdk

However, does this mean it's going to work with React Native too?

1 Answers1

0

Well, is a REST API so it should work with a couple of tweaks. Some of the examples are using $.ajax which I dont believe you have in RN, but you have fetch which you can use for something similar.

I actually use fetch to call many REST APIs so you should be fine. I personally use the JS client first and if it does not work at first try, make a wrapper of my own against the REST API.

sebastianf182
  • 9,844
  • 3
  • 34
  • 66
  • I'm still a bit confused. In the directions for DreamFactory's ReactJS example (https://github.com/dreamfactorysoftware/reactjs-sdk), it says to add the API key to 'bundle.js' if files are on the server or 'script.js' if on my machine. For the JavaScript directions (https://github.com/dreamfactorysoftware/javascript-sdk), it says to put the API key into "script.js". I guess what's confusing is the fact that there is no 'bundle.js' or 'script.js' in React Native projects. Can I just make a file named "script.js" and import it into React Native's index.ios.js? – Johnny_Five Mar 12 '17 at 10:03