React Luau

repository·main·Indexed 19 days ago

https://github.com/roblox/react-luau

A highly-tuned translation of ReactJS 17.x into Luau, designed for building declarative user interfaces within the Roblox engine. The repository includes various modules such as react-roblox-reconciler, react-test-renderer, react-devtools-core, and ports of official React packages like react-is and react-noop-renderer.

Tokens
32.2K
Snippets
99
Records
142
Agent score
63%

What's inside react-luau

  1. Overview of jest-react

    main
    jest-react is a Roblox Lua port of the official jest-react package from the React repository. It provides specialized Jest matchers and utilities designed specifically for testing components using the React Test Renderer. This package allows developers to write expressive assertions about the rendered output of their React components in a Lua environment.
  2. Overview of react-roblox-reconciler

    main

    The react-roblox-reconciler is a Roblox-opinionated renderer designed to act as a replacement for native renderers like react-dom. It aims to mimic the interface of react-dom while being optimized for the Roblox environment.

    Note: This project is currently under construction.

  3. Overview of roact-compat

    main

    What is roact-compat?

    roact-compat is a thin compatibility layer designed to connect Roact 1.4.0 to the new Roact 17 alignment effort.

    It is not intended to match an upstream package exactly. Instead, it is used to encapsulate specific deviations required to maintain compatibility with production Roact codebases during the transition to the new React/Roact alignment.

  4. Overview of react-test-renderer

    main

    react-test-renderer is a Roblox Lua port of the react-test-reconciler package from React. It is designed to facilitate integration-level tests in environments like react-dom. It is intended to be useful for testing with the Roblox renderer once integration is more complete.

    Current Status: 🔨 Partially Ported. Currently, it only includes configurations for testing with the noop renderer.

  5. Overview of react-is

    main
    The react-is package is a Roblox Lua port of the official React react-is package. It provides a set of constants and runtime check functions used to identify various valid types of React elements. This is useful for building libraries or tools that need to perform type checking on React objects at runtime.
  6. Overview of react-cache

    main

    react-cache is a basic caching implementation designed for React applications. It is primarily intended to serve as a reference for more advanced caching implementations and is meant to be used alongside experimental React features.

    Warning: This package is unstable and intended for demonstration purposes only. Do not use it in a production application.

  7. Overview of React Luau

    main

    React Luau is a declarative, component-based library for building user interfaces in Luau, based on React 17. It is highly-tuned for the Roblox environment.

    Key characteristics:

    • Declarative: You design simple views for each state, and React efficiently updates and renders components when data changes.
    • Component-Based: Build encapsulated components that manage their own state and compose them into complex UIs. Logic is written in Luau rather than being managed via Roblox Instances, allowing for easier data passing and state management.
    • Tuned for Roblox: Includes Luau-specific optimizations, such as Bindings (a signals-based state mechanism that avoids full re-renders) for high-performance animations.