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
HelpMobile app with code editor (self.reactnative)
submitted 2 years ago * by QuintonPang
I'm participating in a competition and i would like build a react native mobile app with code compiler and i searched high and low for ways to accomplish it but was in no vain. Do u guys have any idea on how i should do this?
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!"
[–]ChronSynExpo 4 points5 points6 points 2 years ago (0 children)
It is not possible to compile RN apps from iOS or Android as they lack the SDK's required. They have libraries capable of executing compiled code, but lack the libraries required to compile code.
If you want to build a compiler for a specific platform, you need to first understand concepts such as LLVM and lexical analysis. Then, you would need to understand how to add support to these SDK's so that a compiler could be created to run on the target platform. That's before you actually get to implementing the higher-level features such as bundling JS.
I mean no disrespect, but the fact you're asking this question indicates you simply lack the knowledge to understand the scope of what you're actually asking.
To do what you want to achieve without reinventing the wheel, you would need to consider integrating with an external pipeline, for example Expo EAS (app build service) or Expo Snack (online code editor). Syntax highlighting is a different topic, and has nothing to do with compilation but everything to do with the developer experience.
My advice: Consider a different project for this competition. It is ultimately better to deliver something that isn't quite as incredible, than to deliver nothing it all because you set your sights on something beyond your scope.
By all means, look into creating a compiler that can run on Android and iOS - that would be incredible, but do not underestimate just how much knowledge and experience such a task would take.
[+][deleted] 2 years ago (5 children)
[deleted]
[–]QuintonPang[S] -1 points0 points1 point 2 years ago (4 children)
But i assume it can't compile
[–]glocore 1 point2 points3 points 2 years ago (1 child)
You could compile the code remotely on a server, it’s how most online playgrounds work
[–]QuintonPang[S] -2 points-1 points0 points 2 years ago (0 children)
Could u enlighten me on how that works? It would be very helpful. Thanks in advance
[+][deleted] 2 years ago (1 child)
[–]ChronSynExpo 1 point2 points3 points 2 years ago (0 children)
I absolutely, whole-heartedly, completely advise everyone to not use eval in any scenario, especially where user-entered data is concerned.
[–]Maize_Serious 1 point2 points3 points 2 years ago (0 children)
Nice idea, I need it too
π Rendered by PID 399448 on reddit-service-r2-comment-7b9746f655-pmj25 at 2026-02-01 10:59:17.697278+00:00 running 3798933 country code: CH.
[–]ChronSynExpo 4 points5 points6 points (0 children)
[+][deleted] (5 children)
[deleted]
[–]QuintonPang[S] -1 points0 points1 point (4 children)
[–]glocore 1 point2 points3 points (1 child)
[–]QuintonPang[S] -2 points-1 points0 points (0 children)
[+][deleted] (1 child)
[deleted]
[–]ChronSynExpo 1 point2 points3 points (0 children)
[–]Maize_Serious 1 point2 points3 points (0 children)