I added a small snippet into `:Set()` that does a type check on your values to protect you from changing types. # Explanations for whoever code reviews this: Return Roact.createElement("TextButton", ) - Errors due to nested type mismatch Local M圜omponent = Roact.Component:extend("M圜omponent") Local BasicState = require(path.to.BasicState) Triggers the RBXScriptConnection above and prints Print(string.format("Hello, %s goodbye %s!", NewValue, OldValue)) State:GetChangedSignal("Hello"):Connect(function(NewValue, OldValue) Here’s a quick example of how BasicState can be used: local BasicState = require(path.to.BasicState) rbxm/.rbxmx file from the releases page and drop it into Studio. Grab a copy from the Roblox Library (Toolbox), or download the latest. $ npm i yarn add pnpm add bindings are provided by Please file any issues for the npm package over on their repo. While this package doesn’t officially support TypeScript, bindings are available under the package, which can be installed using npm or yarn. WallyĪdd BasicState to your wally.toml and run wally install ĭescription = "My awesome Roblox project" 0.5.xĭownload/clone this repo on to your device, and copy the /src directory into your packages directory. Once added, simply sync into Studio using the Rojo plugin. You can use git submodules to clone this repo into your project’s packages directory: $ git submodule add packages/BasicState It makes use of BindableEvents to allow your project to watch for changes in state, and provides a simple but comprehensive API for communication with your state objects. No more updates will be made however, both the repo and downloads will remain available.īasicState is a really simple key-value based state management solution.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |