Mar 8, 2023
But I can understand why you need this functionality. If you handle it with ContextAPI, then go with it.
But I'm 100% sure you can not pass a setData reference with href.
```
href={{
pathname: "/Blog",
query: { slug: setData },
}}
# or
href="/setData."
```
because href accepts only a string value.
Before writing the answer, firstly, I tested and wrote to answer your question.
checkout the code https://codesandbox.io/p/sandbox/friendly-hooks-r2c648
open Header and Blog component where i test it.