{"id":"jsdotlua/react","name":"react","scope":"jsdotlua","platform":"roblox","description":"Mirrored from the Wally registry.","version":"17.2.1","latest":"17.2.1","versions":["17.0.1","17.0.2","17.0.3","17.0.4","17.1.0","17.2.0","17.2.1"],"license":"MIT","licenseRating":"safe","licenseCaveats":[],"licenseVerified":true,"dependencies":{"jsdotlua/luau-polyfill":{"version":"^1.2.6","alias":"luau-polyfill"},"jsdotlua/shared":{"version":"^17.2.1","alias":"shared"}},"integrity":"6d02e6ed1251ea08955cff1ee9d09e8cc355896180b1953e72d53bbce7110b56","likes":0,"downloads":0,"install":"forest install jsdotlua/react","url":"https://forest.dev/p/roblox/jsdotlua/react","files":"https://api.forest.dev/ai/package/roblox/jsdotlua/react/files","readme":"# `react`\n\nReact is a library for creating user interfaces.\n\nThe `react` package contains only the functionality necessary to define React components. It is typically used together with a React renderer like `react-roblox`.\n\n## Usage\n\n```lua\nlocal React = require(Path.To.React)\nlocal ReactRoblox = require(Path.To.ReactRoblox)\n\nlocal e = React.createElement\nlocal useState = React.useState\n\nlocal function Counter()\n    local count, setCount = useState(0)\n\n    return e(\"Frame\", {}, {\n        CurrentCount = e(\"TextLabel\", {\n            Text = count,\n            ...\n        }),\n        IncrementButton = e(\"TextButton\", {\n            Text = \"Increment\",\n            ...,\n\n            [React.Event.Activated] = function()\n                setCount(count + 1)\n            end\n        })\n    })\nend\n\nlocal root = ReactRoblox.createRoot(Instance.new(\"Folder\"))\nroot:render(ReactRoblox.createPortal(e(Counter), playerGui))\n```\n\n## Documentation\n\nSee https://react.dev/\n\n## API\n\nSee https://react.dev/reference/react\n","readmeBorrowedFrom":{"version":"17.0.4","source":"wally"},"readmeTruncated":false}