Created
October 17, 2021 06:02
-
-
Save glinesbdev/d78990ff3c63062f90a60beb41920aa0 to your computer and use it in GitHub Desktop.
Rodux store:dispatch error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23:56:36.778 ReplicatedStorage.Modules.Rodux.Store:140: Reducers may not dispatch actions. - Client - Store:140 | |
23:56:36.778 Stack Begin - Studio | |
23:56:36.778 Script 'ReplicatedStorage.Modules.Rodux.Store', Line 140 - function dispatch - Studio - Store:140 | |
23:56:36.778 Script 'ReplicatedStorage.Modules.Rodux.Store', Line 89 - Studio - Store:89 | |
23:56:36.778 Script 'ReplicatedStorage.Modules.Rodux.loggerMiddleware', Line 12 - Studio - loggerMiddleware:12 | |
23:56:36.778 Script 'ReplicatedStorage.Modules.Rodux.Store', Line 98 - Studio - Store:98 | |
23:56:36.778 Script 'Players.glinesbdev.PlayerScripts.Modules.Store', Line 46 - Studio - Store:46 | |
23:56:36.778 Script 'ReplicatedStorage.Modules.Knit.Util.Remote.ClientRemoteSignal', Line 100 - Studio - ClientRemoteSignal:100 | |
23:56:36.778 Stack End - Studio |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Service:SetProfile(player: Player, key: string, value: any) | |
DataManager:Set(player, key, value) | |
self.Client.FetchStoreAction:Fire(player, { type = ReducerActions.UPDATE_PLAYER_PROFILE }) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local function reducer(state, action) | |
local newState = state or {} | |
if action.type == ReducerActions.UPDATE_PLAYER_PROFILE then | |
return Llama.Dictionary.merge(newState, services.PlayerProfileService:GetProfile()) | |
end | |
return newState | |
end | |
services.PlayerProfileService.FetchStoreAction:Connect(function(serverAction: { type: string, payload: any }) | |
store:dispatch(serverAction) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment