Why IE 11 display blank page rendering react app

后端 未结 8 1967
借酒劲吻你
借酒劲吻你 2020-11-30 07:04

I have an issue with IE 11 and my react app. I use Webpack, babel and polyfill.io cdn and all is nice until rendering bundeled file, then it stops doing anything. Do you hav

8条回答
  •  [愿得一人]
    2020-11-30 07:54

    Not any polyfill on earth seemed to help so I debugged for ages and finally figured out from a React developer "error" (only seen in IE11 dev. tools):

    The above error occurred in the 

    component: in h2 (created by CMSHeading) // ...

    Which had:

    const {
      ...styles
    } = this.props;
    return (

    ...

    );

    The only thing was that I was accidentally sending other stuff down that wasn't just css styles but Objects etc. So I made sure that I was only sending real styles to it and then everything started working again :)

提交回复
热议问题