Crud Entities

LYXS is designed to cache a copy of all entities needed by your current route to render. In order to decouple all actions from the rest of your reducers, we strongly suggest you give your CrudCollections a parent state extending CrudEntities.

import { PoststState } from './posts.state';

@CrudEntities({
    name: 'entities',
    children: [PostsState]
})
export class EntitiesState extends CrudEntitiesState { }

This enables resetting all your children's states at once by calling EntitiesState.reset() .

State paths

In the example code above, the path of PostsState will be entities.posts because it is a child of the EntitiesState. See States Registry for more information.

Last updated