Namespace Unity.AppUI.Redux
Classes
AbortedWithReasonException
An exception thrown when a Thunk is aborted.
Action
An action without a payload.
ActionCreator
An action creator.
ActionCreator<TPayload>
An action creator with a payload.
Action<TPayload>
An action with a payload.
AsyncThunkAPIExtensions
Extensions for the async thunk API.
AsyncThunkAction<TPayload>
An Asybc Thunk Action that does not receive a payload.
AsyncThunkAction<TArg, TPayload>
An action created by an async thunk action creator.
AsyncThunkCreatorBase<TArg, TPayload>
The async thunk action creator.
AsyncThunkCreator<TPayload>
The async thunk action creator for a thunk without arguments.
AsyncThunkCreator<TArg, TPayload>
The async thunk action creator.
AsyncThunkOptions
Options for the async thunk.
AsyncThunkOptions<TArg>
Options for the async thunk with arguments.
ConditionUnmetException
An action dispatched when the condition set in the options of the Async Thunk creation is not met.
DefaultEnhancerConfiguration
Configuration for the default enhancer.
FulfilledActionCreator<TPayload>
An Action Creator to create fulfilled actions for async thunks.
FulfilledAction<TArg, TPayload>
An action dispatched when the thunk is fulfilled.
FulfilledMeta<TArg>
The metadata of the thunk when it is fulfilled.
Meta<TArg>
The metadata of the thunk.
PartitionedState
A partitioned state. This is the specialization of a state that is partitioned into multiple slices.
PendingActionCreator<TPayload>
An Action Creator to create pending actions for async thunks.
PendingAction<TArg, TPayload>
An action dispatched when the thunk is pending.
PendingMeta<TArg>
The metadata of the thunk when it is pending.
ReducerSwitchBuilder<TState>
The Reducer Switch Builder is used to build a reducer switch statement via method chaining. You must have created Action Creators for each action type you want to handle prior to using this.
RejectedActionCreator<TPayload>
An Action Creator to create rejected actions for async thunks.
RejectedAction<TArg, TPayload>
An action dispatched when the thunk is rejected with an optional payload.
RejectedMeta<TArg>
The metadata of the thunk when it is rejected.
RejectedWithValueException<TPayload>
An exception thrown when a Thunk is rejected.
SliceReducerSwitchBuilder<TState>
The Slice Reducer Switch Builder is used to build a reducer switch statement via method chaining. This builder does not require you to create Action Creators. It will automatically create them for you.
Slice<TState, TStoreState>
A Slice is a collection of reducers and actions for a specific domain. It is a convenient way to bundle them together for use in a Redux store.
StoreExtensions
Extensions for the IDispatchable.
StoreFactory
Factory methods to create Redux stores.
Store<TStoreState>
A store holds the whole state tree of your application. The only way to change the state inside it is to dispatch an action on it. Your application should only have a single store in a Redux app. As your app grows, instead of adding stores, you split the root reducer into smaller reducers independently operating on the different parts of the state tree.
The store has the following responsibilities:
- Holds application state
- Allows access to state via Get
- Allows state to be updated via Dispatch(IAction)
- Registers listeners via Subscribe<TSelected>(Selector<TStore
- Handles unregistering of listeners via the function returned by Subscribe<TSelected>(Selector<TStore
Here are some important principles you should understand about Reducers:
- Reducers are the only way to update the state.
- Reducers are pure functions that take the previous state and an action, and return the next state.
- Reducers must be pure functions. They should not mutate the state, perform side effects like API calls or routing transitions, or call non-pure functions.
- Reducers must not do asynchronous logic.
- Reducers must not call other Reducer<TState>.
- Reducers must not call Subscribe<TSelected>(Selector<TStore
- Reducers must not call Get
- Reducers must not call Dispatch(IAction)
SubscriptionBase<TStore, TState, TSelected>
A base subscription to a store for a selected state.
Subscription<TState, TSelected>
A subscription to a store for a selected state.
SwitchBuilder<TBuilder, TState>
Base implementation of a switch statement builder to generate a reducer.
Thunk
Utility class for creating thunk middleware.
ThunkAPI<TArg, TPayload>
An interface to interact with the thunk during the execution. You can use this interface to abort the thunk, reject the thunk with a value, or fulfill the thunk with a value. You also have access to the store to dispatch new actions.
Structs
SubscribeOptions<TResult>
Options for subscribing to a store.
Interfaces
IAPIInterceptor<TPayload>
A Thunk API that can early reject or fulfill the thunk with a value.
IAction
Interface for an action.
IActionCreator
Base interface for an ActionCreator.
IActionCreator<TPayload>
Interface for an action creator with a payload.
IAction<TPayload>
Interface for an action with a payload.
IAsyncThunkAction
Metadata for pending actions dispatched by async thunks.
IAsyncThunkCreator<TPayload>
Interface for an async thunk creator.
IAsyncThunkCreator<TArg, TPayload>
Interface for an async thunk creator with argument.
IDispatchable
An object that can dispatch an Action.
IDisposableSubscription
Represents a subscription to a store.
INotifiable<TState>
Interface for a store that can notify subscribers of state changes.
IPartionableState
Interface to implement a store state that can be sliced.
IPartionableState<TStoreState>
Interface to implement a store state that can be sliced.
ISlice<TStoreState>
Base interface for a slice.
IStateProvider<TState>
Interface for a Store with a specific state type.
IStore
Representation of a Redux Store.
IStore<TState>
Representation of a Redux Store.
ISubscription<TState>
A Subscription to a store. This abstraction is used by the store to manage subscriptions.
ISwitchBuilder<TBuilder, TState>
Definition of a switch statement builder to generate a Reducer.
ISwitchMatchBuilder<TBuilder, TState>
A switch statement builder that can be used to build a switch statement for a reducer.
IThunkAPI
Base interface for the Thunk API.
IThunkAPI<TPayload>
Thunk API definition.
IThunkAPI<TArg, TPayload>
Thunk API definition with an argument passed when dispatching the thunk.
Enums
ThunkStatus
The status of the thunk.
Delegates
ActionMatcher
A predicate function that takes an action and returns true if the action should be handled by the reducer.
AsyncThunkOptions<TArg>.ConditionHandler
A condition to check before dispatching the action.
AsyncThunkOptions<TArg>.ConditionHandlerAsync
A condition to check before dispatching the action asynchronously.
AsyncThunkOptions<TArg>.IDGeneratorHandler
A generator to create a unique ID for the request.
AsyncThunk<TPayload>
The thunk task runner.
AsyncThunk<TArg, TPayload>
The thunk task runner.
Dispatcher
A function that dispatches an action in the store to update the state.
DispatcherComposer
A function that enhances the dispatcher. This is the returned type of a Middleware<TStore
Listener<TState>
A listener for the store state change.
Middleware<TStoreState>
A Redux middleware is a higher-order function that composes a dispatch function to return a new dispatch function.
Reducer<TState>
A function that takes the current state and an action, and returns a new state.
Reducer<TPayload, TState>
A function that takes the current state and an action with a payload, and returns a new state.
Selector<TState, TSelected>
A selector for a state.
Slice<TState, TStoreState>.GetSliceState
Definition of the delegate method to get the slice state from the store state.
Slice<TState, TStoreState>.Selector<TSelected>
Definition of a Redux Selector for a Slice.
Slice<TState, TStoreState>.SetSliceState
Definition of the delegate method to set the slice state in the store state.
StoreEnhancerStoreCreator<TState>
A function that creates a new store. This is a parameter to the store enhancer.
StoreEnhancer<TState>
A function to enhance the store creation.