How to do an async API call in useEffect (T3 stack)
Hey, I have the router below and want to call the
tutorasync in an useCallback function, but the only method that is available is api.chat.queryTutor.useQuery() which is a hook where you add the input in advance. But I have it available only in the useCallbackfunction. is there a way to access the function directly without a hook?Solution
You are after all getting a new state back from the request, the backend is creating something for you even if it doesn't store it