-
Notifications
You must be signed in to change notification settings - Fork 49.8k
Description
Do you want to request a feature or report a bug?
report a bug
What is the current behavior?
When using Suspense, I see React.Suspense fallback layout instead of loaded component in IE 11 (IE network panel shows, that bundle was loaded)
I can not reproduce this bug in 16.7.0-alpha.2! there is everything ok.
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Paste the link to your JSFiddle (https://jsfiddle.net/Luktwrdm/) or CodeSandbox (https://codesandbox.io/s/new) example below:
const UserCabinet = React.lazy(() => import('PublicUser/components/UserCabinet/UserCabinet'));
function WaitingComponent(Component) {
return props => (
<React.Suspense fallback={<div>Loading...</div>}>
<Component {...props} />
</React.Suspense>
);
}
class PublicRoutes extends React.Component<{}> {
render() {
return (
<Switch>
<PublicPage path="/login" component={AuthPage} />
<PublicPage path="/signUp" component={SignUpPage} />
<PrivatePage path="/cabinet" component={WaitingComponent(UserCabinet)} />
<Redirect to="/login" />
</Switch>
);
}
}
What is the expected behavior?
see the rendered component
Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?
Tested on IE11 on windows 7
It reproduces only in 16.8.0-alpha.0
I can not reproduce this bug in 16.7.0-alpha.2, there is everything ok.
In Chrome is everything ok in all versions.