A default version of the @dispatcherAdvanced with the token already provided.
A default version of the @gearAdvanced with the token already provided.
Works as a isProvider for the @provider.
A default version of the @providerAdvanced with the token already provided.
A decorator that works as a Redux store provider. See @provider for more information.
A default version of the @reduxAdvanced with the token already provided.
Creates tokens to bind decorators with each other.
A decorator that converts a class method or field (with an action creator assigned) to a redux dispatcher. Redux will dispatch everything the wrapped function returns.
const someExternalAction = (value: string) => ({
type: 'SOME_EXTERNAL_ACTION',
payload: value,
});
@redux
class ReduxExample extends HTMLElement {
@dispatch public fieldExample = someExternalAction;
private secretNumber: number = 10;
@dispatch
public methodExample(value: number) {
return {type: 'SOME_ACTION', payload: value + this.secretNumber};
}
}
a token issued by a createReduxToken function that connects all decorators in a single working system.
A default version of the @isProviderAdvanced with the token already provided.
A decorator that makes a class declaration a Redux provider with a store as a context value. The @consumer decorator is used internally.
a token issued by a createReduxToken function that connects all decorators in a single working system.
A default version of the @unitAdvanced with the token already provided.
A decorator that makes a class property a reflection for the specific store value. Whenever the value is changed, the property receives an update as well.
@redux
class ReduxExample extends HTMLElement {
@unit(store => store.foo)
public foo!: number;
}
a token issued by a createReduxToken function that connects all decorators in a single working system.
a function that extracts the value to reflect from the store.
Generated using TypeDoc
This module provides a Redux connector for web components.