this is a automated and typeful version of https://github.com/pmndrs/zustand/blob/bf9d0922fe9292c2399b9594eafe9304016b52d9/docs/guides/initialize-state-with-props.md I'm not sure if it is a great approach of doing it. because I don't have much knowledge of how SSR codes should work. That's why I placed it in gist, not a repository. if you have any idea of improving it or if you think there are better ways, I'd so glad to know :)
export const createBearStore = makeStoreCreator((set) => ({
  bears: 0,
  increasePopulation: () => set((state) => ({ bears: state.bears + 1 })),
  removeAllBears: () => set({ bears: 0 }),