JSPM

  • Created
  • Published
  • Downloads 2187
  • Score
    100M100P100Q116959F
  • License MIT

Package Exports

  • @rbxts/react-roblox
  • @rbxts/react-roblox/src/init.lua

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@rbxts/react-roblox) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

react-roblox

This package serves as a Roblox renderer for React. It is intended to be paired with the generic React package, which is shipped as core-packages/react to Wally.

Usage

local React = require(Path.To.React)
local ReactRoblox = require(Path.To.ReactRoblox)

local function App()
    return React.createElement("TextLabel", {
        Text = "Hello, world!"
    })
end

local element = React.createElement(App)

local root = ReactRoblox.createRoot(Instance.new("Folder"))
root:render(ReactRoblox.createPortal(element, playerGui))

API

TODO