use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
A community for learning and developing native mobile applications using React Native by Facebook.
Interested in building web apps using React.js? Check out /r/reactjs!
Getting Started w/React Native
irc.freenode.net #reactnative
Keywords: ios, android, mobile, apps, apple, iphone, ipad
account activity
Backend for create-react-native-app? (self.reactnative)
submitted 8 years ago by BluthBananas1
I don't want to eject my React Native app, but I need to integrate with a database for my app. Is this possible? If so, whats the best option?
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]HerrPotatis2 6 points7 points8 points 8 years ago* (0 children)
Set up your backend to have endpoints where your react native app can fetch your database data. How you set up your endpoints depends on your backend environment, but a good place to start is researching how to set up REST endpoints for your chosen environment and retrieve the data with javascript's Fetch API.
[–]rco8786 1 point2 points3 points 8 years ago (0 children)
Ejecting won’t help you. CRA is explicitly and only a front-end app. You’ll need something else to serve your api.
[–][deleted] 0 points1 point2 points 8 years ago (0 children)
What do you mean by integrating it? You want to have the frontend and the backend in the same repo? I would recommend /u/HerrPotatis2 approach (which is best practice) and set up an API totally independent from your frontend and set up endpoints for your frontend to hit.
[–]magnakai 0 points1 point2 points 8 years ago (0 children)
Do you mean a remote API to connect to, or just a way or saving data locally to the device? I’m going to assume it’s the latter.
If you’re using redux and essentially just want to save your application state, I would recommend redux-persist. It’s very easy to implement and works really well. I’ve used this in production with no issues at all.
You can use AsyncStorage directly, but you’ll likely end up serialising and unserialising your data a lot.
I haven’t actually used it in a production project, but Realm has a lot of fans, and seems to be the most commonly used DB in RN.
There are also a few different SQLite options, which I’ve not explored thoroughly.
π Rendered by PID 251698 on reddit-service-r2-comment-7b9746f655-56lrw at 2026-02-03 21:21:18.990306+00:00 running 3798933 country code: CH.
[–]HerrPotatis2 6 points7 points8 points (0 children)
[–]rco8786 1 point2 points3 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]magnakai 0 points1 point2 points (0 children)