{"id":"sbi-n/react-base-components","name":"react-base-components","scope":"sbi-n","platform":"roblox","description":"Mirrored from the Wally registry.","version":"0.2.2","latest":"0.2.2","versions":["0.1.1","0.1.2","0.1.3","0.1.4","0.1.5","0.1.6","0.1.7","0.1.8","0.2.0","0.2.2"],"license":"MIT","licenseRating":"safe","licenseCaveats":[],"licenseVerified":true,"dependencies":{"jsdotlua/react":{"version":"^17.2.1","alias":"react"}},"integrity":"3099ca888722f686e6afbc1b535ef3f303267ec6a7b2033ec776fd3617766e27","likes":0,"downloads":0,"install":"forest install sbi-n/react-base-components","url":"https://forest.dev/p/roblox/sbi-n/react-base-components","files":"https://api.forest.dev/ai/package/roblox/sbi-n/react-base-components/files","readme":"# ReactBaseComponents\nenable react type checking using pre-defined typed function components\n\n# Build\n```bash\nrokit install # should install rokit from web\npesde install\nlute run build\n```\n\n# Example\n```lua\nlocal React = require(\"@react\")\nlocal ReactBaseComponents = require(\"@react-base-components\")\n\nlocal e = React.e\n\nlocal ScreenGui = ReactBaseComponents.ScreenGui\nlocal Frame = ReactBaseComponents.Frame\n\nlocal function App()\n    return e(ScreenGui, {\n        Rese -- Auto completed to \"ResetOnSpawn: boolean?\"\n    })\nend\n```\n\n## Typed events and changes\n\nUse the generated `Event` and `Change` props when you want autocomplete and typed callbacks. The wrapper converts them to `React.Event` and `React.Change` keys before creating the host element.\n\n```lua\nlocal TextButton = ReactBaseComponents.TextButton\n\nlocal function App()\n    return e(TextButton, {\n        Text = \"Click me\",\n        Event = {\n            Activated = function(rbx, inputObject, clickCount)\n                print(rbx, inputObject, clickCount)\n            end,\n        },\n        Change = {\n            AbsoluteSize = function(rbx)\n                print(rbx.AbsoluteSize)\n            end,\n        },\n    })\nend\n```\n\nThe native `[React.Event.Name]` and `[React.Change.Property]` forms are still forwarded, but Luau cannot attach a different callback type to each table-valued computed key. Prefer the generated nested props when callback typing matters.\n","readmeTruncated":false}