How to keep next.js client side and server side states in sync? - TanStack