From d9c8059f9684146b3a61d556e5619ad57644790c Mon Sep 17 00:00:00 2001 From: Alex Krolick Date: Wed, 27 Jun 2018 21:24:53 -0700 Subject: [PATCH] Don't spread props onto React.Fragment Fixes warning: Warning: Invalid prop `name` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props. in React.Fragment (created by Example) in Example --- core/src/Library.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/src/Library.js b/core/src/Library.js index 913d0fea..ab8cd8cc 100644 --- a/core/src/Library.js +++ b/core/src/Library.js @@ -221,11 +221,13 @@ class SideNav extends React.Component { export class Example extends React.Component { static _kitLibraryExample = true static propTypes = { - name: PropTypes.string.isRequired + name: PropTypes.string.isRequired, + children: PropTypes.node.isRequired } render() { - return + const { children } = this.props + return {children} } }