Create $todos store (with an array) using createStore
. Then create a $todoList store using createStoreMap
.
There will be a map inside of $todoList store. Define map keys with getKey
function and values with createValue
function.
A value object should contain a store inside which will represent an item of your $todos array. Provide this store with a getStore
function.
As a result, $todoList will contain a map of value-objects (by keys). Each object will contain an item-store (with an item of a mapped array)
You can filter, map, concat or do anything you want with items of an array inside $todos.