ChatGPT as My Coding Mentor: A Junior Developer's Journey Learning React and Next.js

Software Development

A junior developer's journey to mastering React and Next.js. Learn how AI became her effective coding mentor through smart prompting, 'explain like I'm 5' techniques, accelerating skill development.

ChatGPT as My Coding Mentor: How I Learned React and Next.js as a Junior Developer

By Ellenoor Bok November 18, 2025 6 min read

A junior developer's journey from confusion to confidence, learning React and Next.js by discovering how to turn AI into an effective coding mentor through better prompting and asking for explanations 'like I'm 5.'

"What's a Hook, and Why Do I Need It?"

That was the very first question I typed into my coding agent on my initial morning as a junior developer. I was completely overwhelmed, staring at React documentation and struggling to grasp useState.

Having come from a background using Svelte in school, I urgently needed to learn React for my new role. The official documentation frequently assumed an understanding of concepts I had never encountered. Terms like "trigger a re-render" and "current state" were prevalent, and I desperately needed someone to patiently explain the fundamentals.

My initial attempts to get help were unsuccessful. When I asked, "What is useState?", my coding agent replied: "useState is one of the most fundamental React Hooks that allows you to add state to functional components." As a junior developer, this explanation was entirely meaningless to me.

When I indicated my confusion, the response improved slightly: "useState is a React Hook that lets you add a variable that 'remembers' its value between renders." Still, the concept remained unclear.

That's when my human mentor intervened. Reviewing my conversation, he advised: "Your agent doesn't know anything about you. You need to explain how you want your answer. Instead of asking it to explain, ask it to explain it like you're 5 years old."

So, I tried a new approach: "Can you explain useState like I'm 5?"

The response was dramatically different: "useState is like a box that remembers something, and whenever you tell it to change, your whole website updates to show the new thing."

Finally, something clicked. This wasn't a rigid technical definition; it was an explanation tailored to my level of understanding. I realized I had discovered something more valuable than traditional documentation: a mentor available 24/7, capable of adapting explanations until I fully grasped the concept.

Developing My Learning Method

That breakthrough with useState taught me how to effectively leverage my coding agent. I developed a systematic approach:

  • Set context: "I'm a junior developer learning React..."
  • Specify my level: "Explain this like I'm new to React" or "Use simple analogies."
  • Manage expectations: "Don't show me code yet; just explain the concept."
  • Ask specifically: Focus on one concept at a time.
  • Request examples: "Can you show me a simple example?"
  • Dig deeper: "Why do I need this? What's the concept behind it?"

The key lay in mastering correct prompting. My mentor's advice on how to frame my questions fundamentally changed everything. Instead of receiving textbook definitions, I began getting explanations that genuinely resonated. The "explain like I'm 5" approach became my go-to strategy whenever I encountered a technical roadblock.

My questions naturally evolved over time.

Week 1: "What's useState?"

Week 4: My queries became significantly more detailed and specific: "I'm a junior developer learning React. I have to use useEffect for my project, but I'm completely new to React and don't understand what it does. Can you explain useEffect like I'm 5 years old, using simple analogies? Don't show me code yet; just explain the concept first. Then, can you show me a simple example? And finally, why do I need useEffect — what's the concept behind it, and why can't I just put my code directly in the component?" I was systematically building my understanding layer by layer, and my coding agent adeptly adapted to my expanding knowledge.

From React to Next.js

After gaining confidence with React fundamentals, I decided to migrate my application to Next.js. A simple question like "I just changed my project from React to Next. What's different now?" initiated conversations about file-based routing, Server Components versus Client Components, and the new App Router.

The transition proved more confusing than anticipated. Instead of asking broad questions, I learned to engage in focused dialogues with my coding agent:

Me: "How do I know which parts of my code are running on the server versus in the browser?" Agent: "In Next.js, components are Server Components by default. If you see 'use client' at the top, that runs in the browser." Me: "But I changed from React to Next.js, so I didn't have those defaults before. How do I know which parts are server-side now?" Agent: "In plain React, everything ran in the browser. Now in Next.js, your components run on the server first unless you add 'use client'. That's why some of your React code might be breaking." Me: "So if I'm getting errors about useState or onClick handlers, those need 'use client'?" Agent: "Exactly! Those are browser-only features. Add 'use client' to components that need interactivity and leave the rest as Server Components for better performance."

These focused conversations taught me more in 10 minutes than hours spent reading Next.js documentation. By specifically addressing my errors instead of vague concepts, I finally grasped the crucial server-client distinction that had previously bewildered me.

Two Months Later

I progressed from not understanding basic React concepts to confidently building full-stack applications with Next.js. More importantly, I learned how to learn effectively with AI as a teacher — a skill that has instilled confidence in my ability to adapt to any future technology.

What Worked for Me:

  • Learning to prompt correctly: My mentor's advice on framing questions made all the difference.
  • Asking for analogies first: The "box" explanation for useState proved that simple comparisons are often more effective than technical definitions.
  • Building progressively: Starting with useState before moving to useEffect, then to Server Components, ensured a solid foundation.
  • Understanding the distinction: Differentiating between core React concepts and Next.js-specific features was critical.

What I Would Do Differently Next Time:

  • Avoid generic questions: Instead of "What is useState?" ask, "Can you explain useState like I'm 5, using a simple example I can relate to?"
  • Don't ask for everything at once: Rather than "Explain React and Next.js," focus on one concept at a time and build understanding gradually.
  • Don't copy code without understanding: Before implementing any solution, ensure you comprehend what each part does and its purpose.
  • Don't skip verification: Always cross-reference information with official documentation or other credible sources, as AI can sometimes provide outdated or overly complex approaches.

Tips for Other Junior Developers:

  • Always set your experience level: Tell your AI, "I'm new to React" or "I've never used hooks before," to receive explanations tailored to your knowledge.
  • Be specific about what confuses you: Instead of "I don't understand," say, "I don't understand why useEffect needs a dependency array."
  • Request step-by-step breakdowns: Ask, "What are the steps to create a React component?" rather than "How do I build a component?"
  • Ask "why": Understanding the reasoning behind patterns helps you apply them effectively to new situations.

The key is to remember that your AI is a conversation partner, not merely a search engine. The more effectively you communicate your needs, the better assistance you will receive.

The Journey

Two months ago, I was unfamiliar with JSX and found basic React documentation confusing. Today, I can build full-stack applications and, more importantly, I possess the skill to effectively learn any new technology using AI as my invaluable learning partner.