feat(companion): initial rn port scaffold
This commit is contained in:
15
aris/store/store.ts
Normal file
15
aris/store/store.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { create } from 'zustand';
|
||||
|
||||
export interface BearState {
|
||||
bears: number;
|
||||
increasePopulation: () => void;
|
||||
removeAllBears: () => void;
|
||||
updateBears: (newBears: number) => void;
|
||||
}
|
||||
|
||||
export const useStore = create<BearState>((set) => ({
|
||||
bears: 0,
|
||||
increasePopulation: () => set((state) => ({ bears: state.bears + 1 })),
|
||||
removeAllBears: () => set({ bears: 0 }),
|
||||
updateBears: (newBears) => set({ bears: newBears }),
|
||||
}));
|
||||
Reference in New Issue
Block a user