Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jiwonz/react-lua-plus
https://github.com/jiwonz/react-lua-plus
luau react react-lua roblox
Last synced: 7 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/jiwonz/react-lua-plus
- Owner: jiwonz
- Created: 2024-07-09T00:59:39.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-07-10T07:22:35.000Z (5 months ago)
- Last Synced: 2024-07-10T14:14:10.569Z (5 months ago)
- Topics: luau, react, react-lua, roblox
- Language: Luau
- Homepage:
- Size: 16.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-react-lua - **Repository**
- awesome-react-lua - **Repository**
README
# react-lua-plus
A lune script that setups `react-lua` with some additional features# Note
Not tested yet in game, only tested intellisenses for `createElement`# Requirements
- `lune`
- `wally`# Installation
Use git submodule
```sh
git submodule add
```# Usage
```sh
lune run react-lua-plus setup # to install react-lua and generate types in cwd
lune run react-lua-plus apply # for apply types for react-lua-plus, useful when you perform `wally install`
lune run react-lua-plus generate -- --output "path/to/output" -- --classes "Class1,Class2,Class3" # to generate react-lua-plus types
```
```lua
local function App()
local message, setMessage = React.useState("Hello world")
return React.Element("TextLabel"){
Text = message,
AnchorPoint = Vector2.new(0.5, 0.5),
Position = UDim2.fromScale(0.5, 0.5),
Size = UDim2.fromOffset(300, 100),
React.Element("UICorner"){}
}
end
```# Features
- Simple to setup and use
- Intellisenses for React `createElement` (but in alternative way called `Element`)
- (wip) Event listening and children in props
- (wip) Server-Sided Rendering (SSR) support for Roblox