Grommet Anchor 'tag' property type expects 'string', so using Link from react-router-dom creates a console warning. Except the warning, everything works fine.
Warning: Failed prop type: Invalid prop
tag
of typefunction
supplied toAnchor
, expectedstring
.
Code:
import {Link} from 'react-router-dom';
...
<Anchor key={route.key} tag={Link} to={route.path} children={route.mainMenuLabel}/>
The documentation says:
tag {string} The DOM tag to use for the element. The default is . This should be used in conjunction with components like Link from React Router. In this case, Link controls the navigation while Anchor controls the styling. The default is a.
"grommet-css": "^1.6.0"
What am I doing wrong and is it possible to get rid of the warning?