How to make a trpc request wait on another hook
I basically have a state that is populated from a query param then an API call (i used context before and now jotai) but it is critical to populate that state first before issuing a following trpc call that will fetch something.
I need to initialize the state at null since it could actually be that where i manage that case by redirecting elsewhere. but if I hit this page, the state is populated but too early for trpc to handle it, and since hooks cannot live inside useEffect, I dont see a way to handle this, is there a way to suspend the trpc hook until I validate that
I need to initialize the state at null since it could actually be that where i manage that case by redirecting elsewhere. but if I hit this page, the state is populated but too early for trpc to handle it, and since hooks cannot live inside useEffect, I dont see a way to handle this, is there a way to suspend the trpc hook until I validate that
guild is not null? or another workaround?