原本写 {children} `</pre> 的地方改写为 <pre>`{children && React.cloneElement(children, { prop, // 需要传入的 props })} 即可 官方案例 Author: Chen YuLink: https://ezcook.de/2017/02/07/react-router-e4-b8-ad-props-e7-9a-84-e4-bc-a0-e9-80-92/Copyright Notice: All articles in this blog are licensed under CC BY-NC-SA 4.0 unless stating additionally.ReactPrevious PostDebounce 函数Next PostBabel-Polyfill 入门 Related Articles 2018-11-115 Tips in [email protected] 2017-09-04AsyncRoute With React-Router-V4 2018-02-28Dockerizing a React App 2017-05-21More Faster React Functional Component 2017-09-05Notes on TS + React + Redux 2018-11-20React Hooks Comment