https://github.com/jsdotlua/react-lua Skip to content Navigation Menu Toggle navigation Sign in * Product + Actions Automate any workflow + Packages Host and manage packages + Security Find and fix vulnerabilities + Codespaces Instant dev environments + GitHub Copilot Write better code with AI + Code review Manage code changes + Issues Plan and track work + Discussions Collaborate outside of code Explore + All features + Documentation + GitHub Skills + Blog * Solutions For + Enterprise + Teams + Startups + Education By Solution + CI/CD & Automation + DevOps + DevSecOps Resources + Learning Pathways + White papers, Ebooks, Webinars + Customer Stories + Partners * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles Repositories + Topics + Trending + Collections * Enterprise + Enterprise platform AI-powered developer platform Available add-ons + Advanced Security Enterprise-grade security features + GitHub Copilot Enterprise-grade AI features + Premium Support Enterprise-grade 24/7 support * Pricing Search or jump to... Search code, repositories, users, issues, pull requests... Search [ ] Clear Search syntax tips Provide feedback We read every piece of feedback, and take your input very seriously. [ ] [ ] Include my email address so I can be contacted Cancel Submit feedback Saved searches Use saved searches to filter your results more quickly Name [ ] Query [ ] To see all available qualifiers, see our documentation. Cancel Create saved search Sign in Sign up You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert {{ message }} jsdotlua / react-lua Public * Notifications You must be signed in to change notification settings * Fork 10 * Star 357 * A comprehensive, but not exhaustive, translation of upstream ReactJS 17.x into Lua. jsdotlua.github.io/react-lua/ License MIT license 357 stars 10 forks Branches Tags Activity Star Notifications You must be signed in to change notification settings * Code * Issues 8 * Pull requests 1 * Actions * Security * Insights Additional navigation options * Code * Issues * Pull requests * Actions * Security * Insights jsdotlua/react-lua This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. main BranchesTags Go to file Code Folders and files Last commit Last Name Name message commit date Latest commit History 445 Commits .github .github WorkspaceStatic WorkspaceStatic bin bin docs docs modules modules roblox-model roblox-model scripts scripts .darklua-dev.json .darklua-dev.json .darklua-wally.json .darklua-wally.json .darklua.json .darklua.json .editorconfig .editorconfig .gitignore .gitignore .npmignore .npmignore .styluaignore .styluaignore .yarnrc.yml .yarnrc.yml CODE_OF_CONDUCT.md CODE_OF_CONDUCT.md DEVIATIONS.md DEVIATIONS.md LICENSE LICENSE README.md README.md aftman.toml aftman.toml default.project.json default.project.json examples.project.json examples.project.json foreman.toml foreman.toml js-to-lua.config.js js-to-lua.config.js mkdocs.yml mkdocs.yml package.json package.json selene.toml selene.toml selene_definitions.yml selene_definitions.yml stylua.toml stylua.toml yarn.lock yarn.lock View all files Repository files navigation * README * Code of conduct * MIT license [Logo] React Lua A comprehensive, but not exhaustive, translation of upstream ReactJS 17.x into Lua. Coverage Status Docs --------------------------------------------------------------------- About the Project React Lua is a comprehensive translation of upstream ReactJS from JavaScript into Lua, and is highly-turned for both performance and correctness. When possible, upstream flowtype and definitely-typed types have been translated into Luau type annotations. The major and minor version of React Lua is aligned to the upstream used for the translation, except where noted. Due to the close nature of the two implementations, most article, video, or blog posts that gives React JS advice can be applied to React Lua -- modulo language differences, of course. About this Fork This repository is a fork of roblox/react-lua with the intention of being the Roblox and global Lua community go-to for React in Lua. Roblox's repository is a read-only mirror of their internal project, and as such cannot be contributed to by the community. They have not published React to any public package registry and have not made alterations for easier use by the community. Original Project Authors Roblox has removed commit author history in their public mirror, which removes credit for the original project authors. Below is a non-exhaustive list of those who originally worked on the project, in no particular order: * Paul Doyle * Matt Hargett * Max Mines * Jamie Kuppens * Carlo Conte * Henry Allen * Oliver Trepanier * Ignacio Falk * Chris Trzesniewski * Kyle Mitofsky Status The react repo is a monorepo with a number of member projects in its packages folder, managed by a Yarn workspace. Below is a description of each of those package, its status in React Lua, and how it likely fits into our future plans. Considered part of react's core functionality or testing capabilities; some or all of this package is necessary to build and validate an MVP. Project Description Status Plan Notes Used for Not Not yet create-subscription subscribing to ported assessed external data Dom event Not Not yet dom-event-testing-library simulation for ported assessed tests Linting plugin Not Not yet Depends on future eslint-plugin-react-hooks for hooks ported assessed linting tools rules Reexports jest-mock-scheduler scheduler Not Not yet testing ported assessed utilities Jest matchers [?] Used for testing jest-react and utilities Ported React component implementations. Defines basic shape of internals like Components and Base react [?] Elements. We react interface Ported added Roblox-specifics like Bindings, but otherwise comply with upstream ReactJS. For drawing Not Unlikely to react-art vector ported be ported graphics API is flagged as Basic cache unstable, is react-cache for use with [?] stable in React experimental Ported 18, used in React features advanced Suspense cases Experimental API considered package for unstable. Might react-client consuming Not Not yet be worth React ported assessed investigating if streaming it stabilizes models Experimental Used by DevTools react-debug-tools debugger [?] and (the Roblox package Ported internal) Roblox Studio Inspector Devtools needs to Top-level app Not Likely to be addressed as a react-devtools for react ported be ported whole to see devtools where/how it translates Devtools needs to Standalone Not Likely to be addressed as a react-devtools-core devtools impl ported be ported whole to see where/how it translates Devtools Not Unlikely to react-devtools-extensions browser ported be ported extension Impl for Devtools needs to embedding in Not Likely to be addressed as a react-devtools-inline browser-based ported be ported whole to see IDEs where/how it translates Experimental Not Not yet react-devtools-scheduling-profiler concurrent ported assessed mode profiler Private shared [?] Used by Roblox react-devtools-shared utilities for Ported Studio Inspector devtools Harness for Devtools needs to testing other Not Not yet be addressed as a react-devtools-shell devtools ported assessed whole to see packages where/how it translates Heavily inspired Entrypoint for Not Unlikely to the top-level react-dom DOM and server ported be ported interface of the renderers React-Roblox Renderer For use with Not Not yet API considered react-fetch experimental ported assessed unstable React features For use with Not Not yet react-interactions experimental ported assessed React features Runtime type [?] react-is checks for Ported React elements This package has Renderer Not Not yet no readme, so react-native-renderer interface for ported assessed it's hard to react-native understand its scope Renderer used [?] Used heavily for react-noop-renderer for debugging Ported internal Fiber framework testing Reconciler implementation [?] Bulk of React's react-reconciler used with Ported complicated logic various lives here renderers Not yet Officially react-refresh Wiring for Not assessed, supported Fast Refresh ported depend on successor to "hot applicability reloading" Experimental package for react-server creating React Not Not yet streaming ported assessed server renderers Test renderer Used for testing helpful [?] much of React's react-test-renderer utilities and Ported internals, can be snapshot used by external support developers Internal react-transport-dom-delay package, Not Unlikely to No readme in likely for ported be ported package testing react-transport-dom-webpack Related to Not Unlikely to Appears to be above ported be ported webpack-specific Includes Tracing Cooperative and Profiling scheduler scheduling [?] features, which implementation Ported are enabled through ReactFeatureFlags We pushed many Loose things into this collection of leaf node module shared shared [?] to fix circular utilities and Ported dependencies. definitions Working with upstream to clean this up. Hook for managing Not Not yet Not sure if/how use-subscription subscriptions ported assessed this will apply in concurrent to Roblox and Lua mode Projects not in the upstream React repo: Project Description Notes Shallow renderer used in tests for some [?] Ported - with tests react-shallow-renderer older React features. that are helping us Re-exported alongside exercise functionality react-test-renderer, in the react package source of truth here. Also exports act() functionality, which Based on react-dom is required for react-roblox renderer, shares much testing components of its code and public that are interface. asynchronously rendered (the default). Meant to ease initial A comaptibility layer adoption of Roact Lua, that emulates some using React APIs roact-compat deprecated behaviors directly is encouraged of legacy Roact and necessary for newer functonality (eg Hooks) Deviations from Roact This repo is meant to supplant the Roact project, which is an open-source project that currently powers many Roblox projects. Our goal is to be as compatible as possible with Roact. With that in mind, however, there will still be a small number of behavioral deviations that make the transition from existing Roact smoother, or account for nuances of the Roblox ecosystem: * Stable Keys: Aligned Roact will allow table keys to be used as stable keys for child elements, equivalent to the behavior relied upon in Roact today * Context: Roact's deprecated _context feature will not be present in React Lua; users will have to switch to the createContext feature, which is present in both Roact and React Lua and is semantically equivalent * Class Component Refs: React Lua will allow refs provided to class components (referred to in Roact documentation as "stateful components") to point to the actual component instance. This is not supported in Roact, and there may be changes around the Roact.Ref prop key to support this with minimal disruption * Bindings: We intend to keep createBindings and joinBindings, a feature unique to Roact and documented here See this document for details about any deviations and the design and refactoring efforts being proposed to address them. Contribution Guidelines * Try to keep the directory structure, file name/location, and code symbol names aligned with React upstream. At the top of the mirrored files, put a comment in this format that includes the specific hash of the version of the file you're mirroring: -- ROBLOX upstream https://github.com/facebook/react/blob/9abc2785cb070148d64fae81e523246b90b92016/packages/scheduler/src/Scheduler.js * If you have a deviation from upstream code logic for Lua-specific reasons (1-based array indices, etc) put a comment above the deviated line: -- ROBLOX deviation: use explicit nil check instead of falsey * For deviations due to Lua language differences (no spread operator) that don't involve changing the logic, don't put a deviation comment. Just use the appropriate equivalent from LuauPolyfill and other utility libraries. * For files that are new and Roblox-specific, use the file name: Timeout.roblox.lua * and for Roblox-specific tests, use the file name format: Timeout.roblox.spec.lua About A comprehensive, but not exhaustive, translation of upstream ReactJS 17.x into Lua. jsdotlua.github.io/react-lua/ Topics react lua Resources Readme License MIT license Code of conduct Code of conduct Activity Custom properties Stars 357 stars Watchers 5 watching Forks 10 forks Report repository Releases 5 v17.1.0 Latest Dec 21, 2023 + 4 releases Packages 0 No packages published Contributors 9 * @grilme99 * @github-actions[bot] * @jeparlefrancais * @matthargett * @christopher-buss * @ZoteTheMighty * @simon-curtis * @chriscerie * @mathfox Languages * Luau 98.7% * Other 1.3% Footer (c) 2024 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact * Manage cookies * Do not share my personal information You can't perform that action at this time.