Skip to main content

Decorators (core)

@Reduce

import { Reduce } from '@hexajs-dev/core';
@Reduce<P>(type: string)

@Reducer

import { Reducer } from '@hexajs-dev/core';
@Reducer()

@State

import { State } from '@hexajs-dev/core';
@State<T>(options: StateOptions)

Supporting Types

StateOptions

interface StateOptions {
context: HexaContext;
state: {
[K in keyof T]: new () => HexaReducer<T[K]>;
};
effects?: Array<new (...args: any[]) => any>;
}