Code
const openInNewTab = true; // could be true or false
export default function App() {
return (
<a
href="https://google.com"
target={openInNewTab ? "_blank" : "self"}
rel={openInNewTab ? "noreferrer" : undefined}
>
Open Google
</a>
);
}
Currently what's happening
If I pass target='_blank' based on some condition as shown in the above snippet, and pass rel='noreferrer' on same condition. It is still showing me warning/error as per the config.
What should happen?
Ideally if the condition is same for both the props it should recognise it and should not give us warning/error.
Please let me know if I am missing something?
Reference:
Sample Codesandbox - https://codesandbox.io/s/mystifying-lake-l0420z?file=/src/App.js
Code
Currently what's happening
If I pass
target='_blank'based on some condition as shown in the above snippet, and passrel='noreferrer'on same condition. It is still showing me warning/error as per the config.What should happen?
Ideally if the condition is same for both the props it should recognise it and should not give us warning/error.
Please let me know if I am missing something?
Reference:
Sample Codesandbox - https://codesandbox.io/s/mystifying-lake-l0420z?file=/src/App.js