JSPM

  • Created
  • Published
  • Downloads 2154
  • Score
    100M100P100Q116025F
  • License MIT

Package Exports

    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 jsdotlua/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