Epps!

Lists Store

This page is an example of creating a collection store of lists. The store called useListsStore extends the useCollectionStore store to benefit from its state properties and methods.

useCollectionStore is supplied with the epps plugin.

Use Lists Store

We create an instance of the lists store using useListsStore and type it with the appropriate methods and state.

Add a list

We add a new list to listsStore using the newList method.

Get a list

Use getItem method to get list. The “name” or “id” properties can be used as selection criteria.

Get lists

Use the getItems method to obtain all lists or those corresponding to the criterion passed as a parameter.

Remove a list

We remove a list to listsStore using the removeItem method.

Set lists

We initialize the store with some list items using the setItems method.