Run JSX Online in a React Playground

Edit a React component, run it instantly, and debug errors without setting up a project.

Your code runs locally in a restricted browser sandbox

React playground workspace

React 18 · Browser sandbox App.jsx + styles.css · packages blocked · run code you trust
Starting compiler…
Code editor Syntax highlighting

Press Control or Command plus Enter to run. When Tab inserts indentation, press Escape and then Tab to move focus out of the editor.

Live preview
Your component will appear here

The starter is compiling locally. Future errors will keep the last working preview in place.

Preparing the playground…

Run React JSX online without project setup

This focused React playground starts with a working component, JSX compiler, CSS file, and live preview. Edit App.jsx, use React hooks, and press Run or Control/Command + Enter to test an idea without creating a repository or installing packages.

Keep the last working preview when code fails

New code is compiled and rendered in a hidden candidate frame. The visible result changes only after that candidate starts successfully. Syntax errors, blocked imports, runtime failures, and console output remain available through Problems and Console while the last successful component stays visible.

A restricted, sandboxed React preview

Compilation happens in a browser worker and preview code runs inside an iframe without same-origin access. Fetch, XHR, WebSocket, external packages, forms, popups, and top-level navigation are blocked. Your App.jsx, CSS, diagnostics, console messages, and rendered preview are masked from session replay. Run only code you trust.

Focused on components, not full projects

The initial playground intentionally contains App.jsx and styles.css. It supports React imports and an optional styles.css side-effect import, but not npm packages, project trees, deployment, or hosted sharing. Use Phoenix Code when the experiment grows into a complete web project.

Download Phoenix Code

React playground questions

Can I use React hooks?

Yes. Import hooks such as useState, useEffect, useMemo, and useRef from React, then export your component as the default export from App.jsx.

Can I install npm packages?

Not in this focused release. Imports other than React and the included styles.css file produce a clear problem instead of contacting a package CDN.

What happens when my JSX has an error?

The editor marks the source location, Problems explains what failed, and the last successful preview remains visible. Fix the code and run again to replace it.

Is this React playground free?

Yes. Phoenix Code does not send your source to a build server, but preview code still runs as JavaScript in your browser. Run only code you trust and do not paste secrets.