Skip to content

feat: complete Zustand store migration to combined slices pattern#695

Open
danieloche635-bit wants to merge 1 commit into
Smartdevs17:mainfrom
danieloche635-bit:feat/refactor-zustand-slices-pattern
Open

feat: complete Zustand store migration to combined slices pattern#695
danieloche635-bit wants to merge 1 commit into
Smartdevs17:mainfrom
danieloche635-bit:feat/refactor-zustand-slices-pattern

Conversation

@danieloche635-bit

Copy link
Copy Markdown
Contributor

Summary

Refactor ~25 individual Zustand stores into a single combined store using Zustand slices pattern. Improves modularity, cross-slice communication, performance, testability, and reduces bundle size.

Changes

Infrastructure

  • Created 11 domain slice files in src/store/slices/
  • Created src/store/combinedStore.ts with persist middleware (AsyncStorage)
  • Created src/store/index.ts with backward-compatible named exports
  • Added integration tests
  • Added migration guide at docs/store-migration.md

Migration

  • All individual store files re-export from combinedStore with deprecation notices
  • Restored missing constant/type exports in webhookStore.ts, cancellationStore.ts, communityStore.ts
  • Updated all consumer files to import from central store

Backward Compatibility

  • All old import paths continue to work
  • No breaking changes

Refactor ~25 individual Zustand stores into a single combined store using Zustand slices pattern. All store state and actions are composed in combinedStore.ts with 11 domain slices.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant