Overview
useCollectionsActions exposes every collection action as a standalone callable function. It is used internally by useCollections but can also be used directly when you need fine-grained control over collection operations without the navigation state.
For most use cases, prefer
useCollections — it combines these actions with navigation state. Use useCollectionsActions only when you need to perform actions independently of a navigation context.Usage Example
Returns
Navigation
Push a collection onto the Redux navigation stack.
Pop the current collection from the navigation stack.
Reset navigation to the root collection.
Data Fetching
Fetch and set the user’s root collection in Redux state.
fetchSubCollections
({ projectId, collectionId }: { projectId: string; collectionId: string }) => Promise<void>
Fetch sub-collections for a given collection and update Redux state.
CRUD Operations
Create a new sub-collection under the specified parent collection. Navigates into the new collection after creation.
Update a collection’s
name.Delete a collection. Updates Redux state to navigate back to the parent.
Add an entity to a collection by creating a junction table entry.
Remove an entity from a collection.
Utility
Clear all collections state from Redux (e.g., on sign-out).

