State management for complex dynamic form - TanStack