zachpmanson / penultimate-guitar

A streamlined Ultimate Guitar client with Spotify integration
https://pg.zachmanson.com
MIT License
6 stars 5 forks source link

Implement tRPC #77

Closed zachpmanson closed 2 months ago

zachpmanson commented 3 months ago

Tracking in trpc branch

zachpmanson commented 2 months ago

or even trpc although thats a bigger change

zachpmanson commented 2 months ago

use zustand for state model for local storage?

don't actually need any local state for logged in accounts, but would like to use local storage for non-logged users.

zustand has a build in persist storage option so can use that.

can use the same approach as now, store userId in an authStore, use @localstorage when userId is unset. to avoid putting the calls RQ calls into the zustand actions, can put zustand actions into a wrapper hook that will also trigger the mutations.