A view management library for Roblox Lua similar to React
Clone or download
ZoteTheMighty and LPGhatguy Change the default value for warnings on element type changes to 'fal…
…se' (#168)

* Change the default value for warnings on element type changes to 'false'. This reflects our growing uncertainty about this being a valid warning in the first place.

* Added changelog entry
Latest commit c05e345 Nov 26, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github Update PR template to mention docs May 26, 2018
benchmarks Move benchmark starter into , will become a server script when Lemur … Jul 20, 2018
docs Roll back changes that allowed setState to be called inside willUpdate ( Oct 3, 2018
examples More examples (#107) Jun 11, 2018
lib Change the default value for warnings on element type changes to 'fal… Nov 26, 2018
modules Update to latest Lemur and TestEZ Jun 28, 2018
.editorconfig Add Rojo config for loading into Studio for testing Mar 16, 2018
.gitignore Get rid of the installer generation script completely Mar 13, 2018
.gitmodules Switch to Git submodules for dependencies. Mar 13, 2018
.luacheckrc Move to lib folder instead of src/X Nov 3, 2017
.luacov Fix coverage 'include' designator Nov 3, 2017
.travis.yml Remove call to install-dependencies in .travis.yml, oops Mar 13, 2018
CHANGELOG.md Change the default value for warnings on element type changes to 'fal… Nov 26, 2018
CONTRIBUTING.md Update contributing guide Sep 13, 2018
LICENSE Add Apache 2.0 license Nov 7, 2017
README.md Rename reify to mount and teardown to unmount (#85) May 10, 2018
bench.lua Move benchmark starter into , will become a server script when Lemur … Jul 20, 2018
mkdocs.yml Remove old component diagram CSS May 9, 2018
rojo.json Move benchmark starter into , will become a server script when Lemur … Jul 20, 2018
spec.lua Update spec script comment Jul 19, 2018

README.md

Roact

A declarative UI library for Roblox Lua inspired by React.
 

Installation

Method 1: Model File (Roblox Studio)

  • Download the rbxmx model file attached to the latest release from the GitHub releases page.
  • Insert the model into Studio into a place like ReplicatedStorage

Method 2: Filesystem

  • Copy the lib directory into your codebase
  • Rename the folder to Roact
  • Use a plugin like Rojo to sync the files into a place

Usage

For a detailed guide and examples, check out the official Roact documentation.

local LocalPlayer = game:GetService("Players").LocalPlayer

local Roact = require(Roact)

-- Create our virtual tree describing a full-screen text label.
local tree = Roact.createElement("ScreenGui", {}, {
	Label = Roact.createElement("TextLabel", {
		Text = "Hello, world!",
		Size = UDim2.new(1, 0, 1, 0),
	}),
})

-- Turn our virtual tree into real instances and put them in PlayerGui
Roact.mount(tree, LocalPlayer.PlayerGui, "HelloWorld")

License

Roact is available under the Apache 2.0 license. See LICENSE for details.