I'm trying to create a wrapper component around the react-router-dom NavLink
component.
I would like my custom component to accept all of NavLinks props, and proxy them down to NavLink
.
However when I do this, I'm getting:
Warning: React does not recognize the staticContext
prop on a DOM
element. If you intentionally want it to appear in the DOM as a custom
attribute, spell it as lowercase staticcontext
instead. If you
accidentally passed it from a parent component, remove it from the DOM
element.
A working demo of the issue can be found here:
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…