@nrbx/react-roblox
v19.0.0
Published
React DOM bindings for Roblox
Readme
@nrbx/react-roblox
React DOM bindings for Roblox. Equivalent of react-dom for the web.
Installation
npm install @nrbx/react @nrbx/react-robloxUsage
import React, { StrictMode } from "@nrbx/react";
import { createPortal, createRoot } from "@nrbx/react-roblox";
const root = createRoot(new Instance("Folder"));
root.render(<StrictMode>{createPortal(<App />, playerGui)}</StrictMode>);API
| Export | Description |
|---|---|
| createRoot(container) | Create a React root mounted on a Roblox Instance |
| createBlockingRoot(container) | Create a root with blocking mode semantics |
| createLegacyRoot(container) | Create a legacy-mode root |
| createPortal(children, container) | Render children into a different container |
| flushSync(callback) | Force a synchronous render flush |
| act(callback) | Wrap code that triggers updates |
| version | The React version string |
