Bring your own React component
Reflex lets you wrap existing React components, including packages from npm, exposing their props and events to your Python application. You do not have to rebuild everything from Reflex's built-in library.
React is the default choice for a modern, interactive frontend, and it also means learning JavaScript or TypeScript, JSX, a build toolchain, and a separate state management story from your backend. Reflex is a Python frontend framework: author the same kind of interface in Python, and Reflex compiles it to a real React application. You do not need to learn JavaScript to ship one.
Reflex is a Python alternative to hand-coding a React application.
See how each approaches the language, components, state, and deployment.
Scroll horizontally to compare both products.
Scroll horizontally to compare →
| Decision | React | Reflex |
|---|---|---|
| Language | JavaScript or TypeScript, plus JSX. | Python. Reflex compiles your interface to React components automatically. |
| Components | Build or install components from npm. Manage a separate package.json and build toolchain. | Built-in components styled with Python props. Wrap existing React components from npm or your own code when you need one. |
| State and backend connection | Client-side state (hooks, Context, or a library like Redux), plus a separate API layer to talk to your backend. | Python state synced to the interface automatically over WebSockets, in the same codebase as your backend. |
| Backend | Not included. Pair with Node, Django, Flask, or FastAPI. | Python backend included, in the same codebase as your frontend components and application state. |
| Deployment | With a standalone React frontend, build and deploy it alongside your chosen backend. Full-stack React frameworks offer integrated deployment options. | Deploy frontend and backend together: managed Reflex hosting, your own AWS, GCP, or Azure account, VPC, or on-prem. |
Compare hand-coding a React application against authoring the same kind of interface in Python with Reflex. Reflex still ships real React under the hood. The difference is which language you write and how many separate pieces you assemble.
Wrap it from Python instead of switching languages.
Reflex lets you wrap existing React components, including packages from npm, exposing their props and events to your Python application. You do not have to rebuild everything from Reflex's built-in library.
Some highly specialized components or integrations may still call for JavaScript or TypeScript. Reflex does not require it for the interface as a whole, and it does not forbid it for the few places it still helps.
SellerX, the World Bank, and Autodesk share how they build interfaces with Reflex. These are their development experiences, not runtime benchmarks.
“With Reflex it is ten times faster than developing with React and FastApi.”
Reuse independent logic if you have it. Start clean if you don't.
01
Reuse independent Python backend logic and keep existing service APIs. Port JavaScript business logic where needed. Hand-written components and client-side state are typically rebuilt as Reflex components and Python state.
02
Compose your pages and components in Reflex. Map hooks and client-side state to explicit Python state and event handlers.
03
Wrap existing React components you want to keep, including components from npm, instead of rebuilding them with Reflex's built-in library. Check their props, events, and browser dependencies during the pilot.
04
Test realistic data volumes and concurrent users, then deploy with Reflex or self-host.
Use managed Reflex hosting or run the frontend and Python backend on your own infrastructure: AWS, GCP, Azure, or on premises. Configure access controls, monitoring, backups, and capacity for your application.
Explore deployment optionsThe Apache 2.0 Python framework is available independently of Build and managed hosting. Your app still depends on Reflex and its other packages.
The AI development product generates and edits framework-based apps. Usage, private projects, repository access, and export entitlements belong to your plan.
Managed deployment is an operating service. You can also self-host a framework app, providing its frontend, Python backend, configuration, and maintenance.
Enterprise packages and services have separate entitlements. Workspace SSO is distinct from app-user authentication. Authorization, auditing, and private deployment need configuration and an agreed operating plan.
The practical details, before you make a move.
No, not for the typical application. You author the interface and application logic in Python, and Reflex compiles it to React. Specialized components or integrations may still call for JavaScript or TypeScript occasionally.
Not exactly. Reflex compiles your Python-authored interface to real React components, so React is still running under the hood. Reflex replaces the need to hand-write that React code yourself, not the library.
Yes. Reflex can wrap existing React components, including those distributed on npm, exposing their props and events to your Python application.
That depends on the implementation of each. Development speed is not a runtime benchmark. SellerX reported roughly ten times faster development with Reflex than with its React and FastAPI stack. That is one customer's experience, not a guaranteed improvement or evidence of faster runtime performance.
Fine-grained control over every line of the generated frontend code, and direct access to the broader React ecosystem's patterns and tutorials, most of which assume you are writing JavaScript. In exchange, you write and maintain one Python codebase instead of two.
Bring a workflow you want to improve, or start a new one. Build it with Reflex.