Developer tools for Reflex, a Roblox state container library.
Warning
This is nowhere near finished, but is usable! It should only be used on the Client at this time.
- Download the binary on the Releases page and place it in your
Roblox/Pluginsfolder. - Download it from the Creator Marketplace.
npm install npm run build...and place it in your Roblox/Plugins folder.
You will need to use a middleware to dispatch actions and state to the plugin.
Here's what I use:
constevent=ReplicatedStorage.FindFirstChild("REFLEX_DEVTOOLS")asRemoteEventconstmiddleware: ProducerMiddleware<RootState,RootActions>=()=>{return(nextAction,actionName)=>{return(...args)=>{conststate=nextAction(...args)if(RunService.IsStudio()&&event){event.FireServer({name: actionName,args: [...args], state })}returnstate}}}export=middlewareWhatever you do, fire the event an object that satisfies the following type:
interfaceDispatchedAction{name: stringargs: unknown[]state: {}}...then apply it to your store:
exportconststore=combineProducers({// ...}).applyMiddleware(devTools)Couldn't get BindableEvents to be received by the Plugin. Context: https://discord.com/channels/385151591524597761/385151591998816257/1149590579529912320
