Module

FPO.Data.Store

This module defines the Store type and the actions that can be performed on it. Using the Store type, we can manage the state of the application and store various pieces of information that need to be accessed across different components (/globally).

#Store

type Store = { currentRoute :: Maybe Route, errorCooldowns :: Map String Instant, inputMail :: String, language :: String, pushStateInterface :: PushStateInterface, toasts :: Array AppToastWithId, totalToasts :: Int, translator :: FPOTranslator }

The Store type represents the global state of the application.

#addError

addError :: forall m. MonadStore Action Store m => MonadEffect m => AppError -> m Unit

Add an error with cooldown checking to prevent spam

#loadLanguage

#reduce

reduce :: Store -> Action -> Store

Update the store based on the action.

#saveLanguage

Modules