You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constopenInNewTab=true;// could be true or falseexportdefaultfunctionApp(){return(<ahref="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.
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
The text was updated successfully, but these errors were encountered: