Another question - one that seems like
Another question - one that seems like it should be way simpler. I'm trying to create a component that will send a custom query up to my backend server every time the user performs a search on an ant design <Search> field. But I'm running into an error currently of "Invalid hook call. Hooks can only be called inside the body of a function". Code is below:
1 Reply
sensitive-blue•10mo ago
Hello @MesbearizingMeat,
This is basic rules of react.
You can't call hooks inside function, you should call hooks from React component
you can use
refetch
function:
code should be similar like this but I suggest you look at the fundamentals of react