Skip to content
Learn Netverks

Lesson

Step 5/36 14% through track

playground-workflow

Playground workflow

Last reviewed May 28, 2026 Content v20260528
Track mode
client_react
Means
In-browser React TSX
Reading
~2 min
Level
beginner

This lesson

This lesson teaches Playground workflow: the concepts, APIs, and habits you need before advancing in React.

Without Playground workflow, you will struggle to read or extend React codebases and playground exercises.

You will apply Playground workflow in contexts like: SPAs, dashboards, design-system-driven products, and React Native mobile apps.

Write TypeScript/TSX, click Run in browser—React 18 loads from CDN, JSX compiles in the tab, UI renders in the preview root, and printOutput feeds the terminal.

At the start of the track—complete before JSX-heavy lessons that assume you understand the playground.

Get the most from each lesson’s live editor with a deliberate loop—the same habits that transfer to Vite, Create React App, or Next.js projects.

Recommended workflow

  1. Read the concept section before touching code.
  2. Click Run in browser to compile TSX and execute in the preview iframe.
  3. Use printOutput(...) to inspect values in the terminal panel below the editor.
  4. When a lesson shows UI, call mountApp(<YourComponent />) — the preview renders inside #root.
  5. Change one idea at a time (one prop, one state variable, one effect dependency).
  6. Read TypeScript errors in the terminal—they often point to wrong prop types before runtime.
  7. Reset the editor if you drift too far from the lesson goal.

What happens when you Run

  • Your TSX is transpiled to JavaScript in the browser (same idea as tsc + JSX transform).
  • React 18 and ReactDOM load from CDN inside a sandboxed iframe.
  • React and ReactDOM are available globals—destructure hooks: const { useState } = React;
  • mountApp uses createRoot to render your element tree into the preview.

Review TypeScript intro if type errors block you—React components benefit heavily from typed props.

Self-check

  1. What is the difference between printOutput and mountApp?
  2. Why change one concept at a time while learning?

Challenge

First run

  1. Click Run in browser with the default code.
  2. Confirm typeof React prints object in the terminal.
  3. Add a second printOutput with your name.

Done when: the terminal shows React types and your custom message.

Interview tip Lesson completion confidence

Can you explain this lesson in 30 seconds without reading notes?

Not saved yet.

Playground

Runs in your browser in a sandboxed frame. Backend runners appear when this track’s profile allows them.

Check yourself

Multiple choice — immediate feedback.

Discussion

Past discussion is visible to everyone. Only logged-in users can post comments and replies.

Starter discussion topics

  • mountApp vs printOutput—when each?
  • TSX error you hit?

Sign up or log in to post comments and sync lesson progress across devices.

No discussion yet. Be the first to ask a question.

Jump