Hi everyone, I have a question about dynamically controlling the “open in new tab” behavior.
I’m trying to use a prop (openInANewTab
) to open a link in a new tab when it’s set to true
. However, it’s not working as expected.
If I hardcode the value to true
, it works perfectly and opens the link in a new tab. But when I pass the value dynamically through the prop, it doesn’t open in a new tab.
The component is reused across multiple pages, so I’m wondering if that could be affecting the behavior.
Has anyone encountered a similar issue or have any idea what might be going wrong?
Thanks in advance!