search/
Start typing to search packages!
package_2
rodux-hooks
By @lopi-py
Roblox
Mirrored from WallyThis version ships no README. Showing the README from v0.1.7, mirrored from wally.
Rodux Hooks
This project takes inspiration from solarhorizon/rodux-hooks in order to make it work with Roact17.
Setup
local RoduxHooks = require(path.to.RoduxHooks)
local store = require(path.to.store)
local useStore = RoduxHooks.useStore
local useSelector = RoduxHooks.useSelector
local useDispatch = RoduxHooks.useDispatch
Api
useStore(): Store
useSelector<S, T>(selector: (S) -> T, equalityFn: ((T, T) -> boolean)?): T
useDispatch(): (action: AnyAction) -> ()
Example
local function MyComponent()
local counter = useSelector(function(state: store.State)
return state.counter
end)
return e("TextLabel", {
AnchorPoint = Vector2.new(0.5, 0.5),
Position = UDim2.fromScale(0.5, 0.5),
Size = UDim2.fromOffset(200, 100),
Text = `Count: {counter}`,
})
end
Package Details
Install command (Click to copy)
Version
0.2.13
License
MIT
Safe for commercial use
The package archive does not include its license text; the license is declared in its manifest metadata.
Automated license review — not legal advice.
