我正在尝试围绕react-router-dom NavLink组件创建一个包装器组件.
原文链接:https://www.f2er.com/react/300925.html我希望我的自定义组件接受所有NavLinks道具,并将它们代理到NavLink.
但是,当我这样做时,我得到:
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.
可在此处找到该问题的工作演示:https://codesandbox.io/s/w0n49rw7kw
谢谢,