Coding React Native with AI · 01: the art of prompting
You already lean on AI to write React Native. The skill that separates a useful answer from a generic one is how you ask. Here is the version i use every day.If you build mobile, you already know the feeling: you paste a vague ask into the AI, get boilerplate that misses your architecture, and…
You already lean on AI to write React Native. The skill that separates a useful answer from a generic one is how you ask. Here is the version i use every day.If you build mobile, you already know the feeling: you paste a vague ask into the AI, get boilerplate that misses your architecture, and decide it is overrated. It is not. The everyday examples below are deliberately non-code so the pattern is obvious, but every one of them maps straight onto a React Native task: a component you want in your style, a refactor you want reasoned through, a PR description you want checked before you hit submit.Prompting is just how you ask an AI for something. The AI reads your words, not your mind, so a lazy question gets a lazy answer. The fix is context: tell it who you want it to be, what you actually need, and what a good result would look like. After that, a handful of simple patterns handle almost anything, from tidying an email to planning a trip to sorting out your notes. No code, no jargon. You get good by practising on the things you already do every day.The AI reads your words, not your mindThe first time a lot of people try one of these tools, they type something like “make me 1 million,” read the bland thing that comes back, and quietly decide it is overrated. I did a version of this for months. I treated it like a smarter Google, typed three words, and was annoyed when i got three-word-quality answers back.Spoiler alert: the “make me 1 million” prompt doesn’t work. Which i think you already know by now.What changed for me was not a better app. It was an afternoon in a park. I had been building a system to organize my life and my work, and instead of typing quick questions at it, i opened the AI on my phone, sat in the sun, and just talked to it for about three hours. What i was working on, what was stuck, what i had been avoiding. It asked questions, i answered. By the evening it could help me in a way it never could when i was firing one-line requests at it.That is the whole game, and it is why prompting matters for everyone now, not just programmers. The AI is not holding out on you. When you leave a question vague, it fills the empty space with something generic, because generic is the safest guess when it does not know what you actually meant.What a good prompt actually containsA good prompt is not longer; it is clearer. Four things usually do it, and you rarely need all four: who you want the AI to be, what you want, the bit of context it cannot see, and what a good answer looks like.Watch what that does to an ordinary request.Lazy: “give me dinner ideas.” You get a generic list, half of which you would never make.Clear: “You’re a practical home cook. Give me three vegetarian dinners for a tired weeknight. I have pasta, spinach, and eggs, i want each one under twenty minutes, and just give me the three with a one-line reason, no essay.” Same question, but now it knows the situation, the limits, and the shape you want back. The answer gets usable.anatomy of a good question for aiThe same question, minus the guesswork.The seven ways to promptPast the basic ask, there are seven simple ways to shape a request. Each one fits a different kind of task. Friendly names first, the technical name in brackets for the curious.Just ask it clearly (zero-shot). A plain, specific question with no setup. “Summarize this email in three bullets and tell me whether i need to reply.” Your default for anything simple.Show it an example (few-shot). Give it one thing you like, then ask for more like it. “Here’s a thank-you note i wrote once that felt right [paste it]. Write one like it for my neighbour who watered my plants.” It copies your taste instead of guessing at it.Make it think out loud (chain-of-thought). Ask it to reason before it concludes. “I’m choosing between two flats. Walk through commute, cost, and daylight step by step, then tell me which one and why.” Forcing the thinking first gets you a real answer instead of a snap one.Break the big thing into steps (decomposition). Do not ask for the whole mountain at once. Planning a five-day trip to Lisbon becomes: first the rough day-by-day, then flesh out one day, then the packing list. Small steps you can check as you go, instead of one overwhelming wall.Ask for the plan, then the work (reason then act). “Tell me how you’d structure a monthly budget for someone with an irregular income, then build it as a table i can fill in.” You see the thinking and get the thing, in one go.Have it check its own answer (self-critique). After it replies, make it review its own work. “Reread that message to my landlord and flag anything that sounds passive-aggressive, then give me a warmer version.” Half the time the second version is the keeper. It is the easiest quality check there is.Keep improving, and save what works (iterate). When the first answer misses, do not start over, tell it exactly what was off. Then teach it your taste: “from now on, keep my messages short and warm, and no exclamation marks.” When a way of asking really works, save it somewhere you can reuse it.If you only remember three: ask clearly for the simple stuff, make it think out loud for anything you are deciding, and have it check itself before you send anything that matters.The seven, one line each. This is the cheat sheet.Your own notes are the best place to practiceYou do not learn this from a course, you learn it on your own life. The clearest place to start is your notes. I keep what people call a second brain, a plain folder of my own notes that the AI can read, and it turned out to be the best practice ground i have.Try the smallest version. Drop a week of messy notes into one place, then ask: “group these into themes, tell me what i keep circling back to, and what i seem to be avoiding.” You are not asking it to invent anything, you are handing it your real material and letting it do the sorting you would never sit down and do yourself. That single move, giving it your stuff instead of a blank question, is prompting patterns 1 through 7 all at once. If you want the full setup, i wrote up how i built mine with Obsidian.Ask, read what came back, steer, save what works. Then again.Where a better question stops helpingHere is the honest limit, and it is the reason this is a series. Asking well fixes one conversation. It does nothing about the fact that the AI forgets you the moment you close the chat. Tell it your preferences today and tomorrow it is a blank slate again. No clever wording fixes that.That is where the work moves from the question to what is around it, giving the AI a memory it can read, which is exactly what a second brain is for. That is the next part of this series. For now, know that when your problem is the AI forgetting rather than misunderstanding, a better sentence was never going to save you.how to get good: practise on your own lifeTry, look at what came back, adjust, go again. That is the whole method and there is no shortcut past the reps. When an answer is bad, read it instead of deleting it, because it is telling you which of the four things you left out. And when a way of asking works, hand it back to the AI and say “write me a cleaner version of this prompt i can reuse.” Using the AI to improve how you talk to the AI sounds silly. It is the fastest way i know to get good, and it is what i do most days.The seven live on a one-page cheat sheet, plain language, ready to copy. Grab it free here.Written by Malik at Code Meet AI. Part 02 (giving the AI a memory) lands there first — subscribe if this was useful.I’m Malik. I build with AI every day and write about using it well, minus the hype. This is part 01 of Using AI, properly. Next: giving the AI a memory, so it stops forgetting you. New parts land first in the newsletter at codemeetai.substack.com.This story is published on Generative AI. Connect with us on LinkedIn and follow Zeniteq to stay in the loop with the latest AI stories.Subscribe to our newsletter and YouTube channel to stay updated with the latest news and updates on generative AI. Let’s shape the future of AI together!Coding React Native with AI · 01: the art of prompting was originally published in Generative AI on Medium, where people are continuing the conversation by highlighting and responding to this story.Source: Generative AI Pub — Published — Category: Image AI