Disable fetch on load
I use trpc to fetch this. But how do I prevent it from fetch at first mount and remove the loading state. I just want the loading to load when i start the input typing - without using my own defined isLoading state.
4 Replies
In mobx it would be very easy.
Since you're using hooks, make it more or less like this:
Thanks a lot. That was pretty simple🫡
Just add {enabled: !!input} to query
Ok i've added that something like that before, but not working. Maybe I put the wrong state there.