Closed
Description
Do you want to request a feature or report a bug?
bug
What is the current behavior?
With React 16.3.0, when using <React.Fragment>
IE 11 gives the following warning:
Warning: Invalid prop `children` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.
Steps to reproduce:
- Use
create-react-app
to create a new React app. - Add
<React.Fragment>
toApp.js
. For example:
import React, { Component } from "react";
import logo from "./logo.svg";
import "./App.css";
class App extends Component {
render() {
return (
<div className="App">
<React.Fragment>
<header className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<h1 className="App-title">Welcome to React</h1>
</header>
<p className="App-intro">
To get started, edit <code>src/App.js</code> and save to reload.
</p>
</React.Fragment>
</div>
);
}
}
export default App;
- Open the app in IE 11.
- Open IE dev tools and refresh the browser.
- You should see the above mentioned warning message in the console window.
No warnings with Chrome, Firefox, and Edge.
What is the expected behavior?
There should be no warnings shown.
Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?
React: 16.3.0
Browser: IE 11
OS: Windows 10