pos-loyalty-state-binder
v0.0.105
Published
Collection of stores for state management for POS project applicable for multiple environments (Web & Mobile).
Downloads
434
Readme
Usage guide
| Resource | description | | ---------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | | index.ts | Exports all the stores from stores folder and QueryClient instance and QueryClientProvider | | queryClient.ts | We export the QueryClient instance and Provider to use the same instance in network calls of store methods. This will avoid any mismatch between instance of handling the network calls using TanStackQuery | | stores Folder | We create all the stores in this stores folder as a seperate file for a specific module and export them in index.ts of the stores folder. | | types Folder | Exports all the types related to stores. Use seperate .d.ts files for defining types for a store and export them in index.d.ts of the types folder. |
Code Standards
- Always use capital I (interface) in as first letter while creating an Interface.
For example,
export interface IMyCustomType {...}
- Use async await functions instead of promises to maintain good code standards.
- Never push code with type errors, and if in extreme circumstances any type can be used, not all the time.
- Never change configurations without prior intimation to Tech leads.