Can I pass refetch as a prop?
Title basically..
The thing is that I am fetching all of my items in component#1, I use them there and I also pass them as a prop to component#2, there I can create a new item. thing is that I would like to use the refetch function in component#2 that comes along the useQuery (which is in component#1).
Is it even something I should do or is it a bad design choice on my end?
How do I approach this issue?
The thing is that I am fetching all of my items in component#1, I use them there and I also pass them as a prop to component#2, there I can create a new item. thing is that I would like to use the refetch function in component#2 that comes along the useQuery (which is in component#1).
Is it even something I should do or is it a bad design choice on my end?
How do I approach this issue?
