Skip to content

Mobile State Architecture (Zustand) #139

@zakkiyyat

Description

@zakkiyyat

The mobile app needs a robust way to manage global state, specifically for Authentication and the User's Cart.
Requirements:

  • Install and configure zustand.
  • Create an useAuthStore (handling user object, token, and login/logout functions).
  • Create an useCartStore (handling an array of matched food items).
  • Integrate expo-secure-store to persist the auth token across app restarts.
    Acceptance Criteria:
  • Auth store correctly persists and hydrates the token on app load.
  • Logging out clears the state and removes the token from secure storage.
  • Cart store can add, remove, and clear items.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions