Real Code: React Native
Ready to level up? It's time to graduate from blocks to real text-based code! You're about to learn how to use JavaScript and React Native to build apps that work on both iPhones and Android phones at the same time.
π Pan's Pro Tip!
Normally, you have to write an app twice: once for iPhones (Apple) and once for Androids (Google). But React Native is a superpower! You write the code once in JavaScript, and the engine automatically builds it for BOTH phones. Magic!
Your One Code File
iPhone App
Android App
β¨ PAN'S RULE: If it's not chaotic, it's not magic! β¨
What's the most chaotic magic trick? Doing something once and having it appear in two places! That's what you're about to learn. π©β¨
π§ Master Builder Knowledge Check
Why do developers love using React Native?
Your First Piece of Magic: The <Text> Component
In React Native, we don't just write words. We build apps out of special LEGO bricks called "components." The simplest, most important brick is the <Text> component. It tells the phone, "Hey! Put these words on the screen!"
π CHALLENGE: Change the message below to your name or a secret greeting!
β¨ Your App Preview β¨
π¬ Go Pro: Real Developer Tools
Ready to try this for real? These are the exact tools professional developers use every day. Go explore!
- Expo Snack: A magical online playground where you can write and run React Native code right in your browser. No installation needed! Try it now!
- React Native Docs: The official rulebook for all React Native magic. All the pros use this. Explore the official docs.
π‘οΈ Safety Check: The links above go to websites made for professional developers. They are safe to use, but you might see forums or comment sections. Remember our rule: never share personal info, and always browse new communities with a parent or guardian.
π Your Mission, Should You Choose to Accept It...
That was awesome! You just wrote your first piece of real app code. In the next module, we're going to take this to the next level. We'll build a real app screen with a button that actually does something when you press it. Get ready to add some action! π₯
π¨βπ©βπ§ Parent Corner
Your builder is moving from drag-and-drop to text-based codingβa huge step! The best way to support them is by exploring Expo Snack together. It's a safe, browser-based tool that lets them experiment without installing complex software on your computer. Ask them to show you what they built!