Skip to content

React apps

Understanding Div-idy’s React and TypeScript output

Div-idy documentation Updated

New Div-idy pages are real React applications written in TypeScript. The editable project contains TSX components, styles, and supporting source files. Div-idy type-checks and compiles that source into HTML, CSS, and JavaScript for the browser. React is the generated app’s framework; you can still build and revise through plain-language prompts.

What files does Div-idy generate?

The usual entry point is src/App.tsx, which exports the page’s main React component. Styling normally lives in src/styles.css. A page can also contain local .tsx components, .ts utilities, and .json data or scene definitions.

This structure supports reusable interface pieces, typed data, event handlers, and stateful interactions. A quiz can track answers and score; a catalog can filter items; a form can show a real submission’s pending and successful states.

How does source become a working preview?

Div-idy checks TypeScript, resolves supported imports, and bundles the code. The platform mounts the exported React component and supplies the surrounding page. Generated source does not need to create its own document shell or mount React manually.

A successful build saves the source and compiled browser artifact as a private draft. Later prompt edits use the authored source rather than asking the model to edit the compiled bundle.

Which platform features can React apps use?

The typed @dividy/runtime module provides navigation, device-local storage, visitor submissions, owner-managed records, public data reads, supported AI calls, maps, and lightweight multiplayer rooms. Each feature retains its permissions and usage limits.

Prepared artwork can be accessed through @dividy/assets, and the scene module supports 2D visual composition and animation. Local source modules and the supported React imports are available; arbitrary npm dependencies and custom server code are outside this runtime.

Is a multi-page project one React router?

Each new page is compiled as its own React application. Div-idy’s navigation uses page slugs to connect them in previews and on published domains. Ask for consistent navigation, design, and data fields across pages rather than assuming a third-party routing package is installed.

What does this mean for building and publishing?

Build a responsive React catalog with category filters, a saved-on-this-device favorites list, and a separate inquiry page. Keep the same navigation and product IDs across pages.

You can describe those behaviors without writing TypeScript. Compilation catches code issues, while your preview review checks the actual experience. Saving a draft and publishing the visitor-facing version remain separate actions.