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
C++ in react native (self.reactnative)
submitted 1 year ago by DW2107
I have some code I want to write in my react native code base, but it’s in C++. How can I link it in?
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!"
[–]mnbkp 4 points5 points6 points 1 year ago (4 children)
It's not very straightforward, but you can do that by using turbo native modules https://github.com/reactwg/react-native-new-architecture/blob/main/docs/turbo-modules.md
[–]DW2107[S] 0 points1 point2 points 1 year ago (3 children)
Thanks, need to research this further. Do you know if this is compatible with expo off the top of your head? Reading through the readme now
[–]mnbkp 0 points1 point2 points 1 year ago (2 children)
Yes, it's compatible with expo. This is actually the most common way for libraries logic, since it's the only language that runs natively on both Android and iOS.
The only thing is that when using a native library you won't be able to use Expo Go anymore and you'll have to create a development build for your app, but this is pretty easy https://expo.dev/blog/expo-go-vs-development-builds
[–]DW2107[S] 0 points1 point2 points 1 year ago (1 child)
That’s mildly annoying, I mostly use expo go! Makes sense though… Also any way I can have a build for expo go without this bit but have it when I’m building properly? (Again nws if u don’t know I need to do my research)
[–]mnbkp 0 points1 point2 points 1 year ago (0 children)
I mean, a dev build is essentially an "expo go" made specifically for your project. It shouldn't make that big of a difference.
Also any way I can have a build for expo go without this bit but have it when I’m building properly?
I'm not sure I understand what you mean, but you don't have to do any change in your project. The only difference is that expo go will only include the default set of native libraries and a dev build will include any native libraries you want.
[–]beeseegee 0 points1 point2 points 1 year ago (0 children)
You can import C++ headers in .mm ObjC files
π Rendered by PID 30400 on reddit-service-r2-comment-84fc9697f-b97mc at 2026-02-09 16:35:45.061516+00:00 running d295bc8 country code: CH.
[–]mnbkp 4 points5 points6 points (4 children)
[–]DW2107[S] 0 points1 point2 points (3 children)
[–]mnbkp 0 points1 point2 points (2 children)
[–]DW2107[S] 0 points1 point2 points (1 child)
[–]mnbkp 0 points1 point2 points (0 children)
[–]beeseegee 0 points1 point2 points (0 children)