const brc = {
liq : [
{"index":"adc", "fdhsjbs": "12bhsdb"},
{"index":"adc", "fdhsjbs": "12bhsdb"},
{"index":"adc", "fdhsjbs": "12bhsdb"}
]
};
const goToPosts = () =>
navigate({
pathname: '/posts',
search: `?${createSearchParams(brc)}`,
});
return (
<div>
Users
<button onClick={goToPosts}>Go to Posts</button>
</div>
);
While using createSearchParams and passing the properties I am getting an error
Argument of type is not assignable to parameter of type URLSearchParamsInit.
Is there any other possible way when a user clicks on the button pass the brc
object to another component based on route setup