UPDATE_RESOURCES: Create or update resources, meta, and/or lists
DELETE_RESOURCES: Delete resources from the resource slice. Deleting resources also
UPDATE_RESOURCESto update the list representing their selection.
UPDATE_RESOURCESaction type is for updating resource information in the store. This action type allows you to update resources across multiple slices at the same time.
resources: An object of resource types to be updated. Here is an example action that updates the books and authors slices at the same time:
meta: Similar to
resources, but for metadata instead of the primary resource attributes. This example updates the metadata for a few resources:
lists: Adds new lists, or replaces existing lists. Note that it is not possible to specify that the lists that you pass in be merged with an existing list. This is because the list order is sometimes significant, and you are responsible for maintaining the proper order.
true, the new resources data that you pass will be shallowly merged with existing resource entries. Passing
falsewill replace the existing resource with the new data that you pass. If you pass a Boolean, then it will apply to every resource slice. You can also pass an object to scope the value to a specific slice.
mergeResources, but for metadata instead.
DELETE_RESOURCESaction type is used for removing resources from the store.
resources: An object of resource types. Within each type, you can specify an array of resources to delete. Here is an example action that deletes a few books:
meta: Metadata to add to the resources. This can be used to store client-side