Skip to content
forked from Roblox/roact

A view management library for Roblox Lua similar to React

License

Notifications You must be signed in to change notification settings

ZoteTheMighty/roact

This branch is 2 commits ahead of, 56 commits behind Roblox/roact:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

3580973 · Sep 6, 2019
May 26, 2018
Aug 1, 2019
Aug 1, 2019
Jun 21, 2019
Jul 10, 2019
Dec 14, 2018
Aug 14, 2019
May 3, 2019
May 3, 2019
Mar 13, 2018
Aug 13, 2019
May 3, 2019
May 4, 2019
Sep 6, 2019
Jun 3, 2019
May 3, 2019
Jun 3, 2019
Aug 12, 2019
May 3, 2019
May 4, 2019
Aug 12, 2019
Sep 6, 2019

Repository files navigation

Roact

A declarative UI library for Roblox Lua inspired by React.
 

Installation

Method 1: Model File (Roblox Studio)

  • Download the rbxm 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 src directory into your codebase
  • Rename the folder to Roact
  • Use a plugin like Rojo to sync the files into a place

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.txt for details.

About

A view management library for Roblox Lua similar to React

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Lua 100.0%