I apologize in advance for if I'm not using the right terminology.
Basically I'm facing a problem with object filters in getStats within this function below.
const handleRefresh = React.useCallback(() => {
getFruitList();
getStats({ type: tab ? "Seedless" : "Seed", filters });
}, [tab, getFruitList, getStats], filters);
The response I aimed to get after calling handleRefresh goes something like
type: Seed
color: Red
shape: Round
But instead I'm getting this
type: Seed
filters: [object Object]
I tried to use JSON.stringify and toString() but it does not work.
Any advise on how to resolve this would be greatly appreciated. Thanks in advance.