Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internet Explorer 11 - A valid react element must be returned #238

Closed
scrambled2k3 opened this issue May 15, 2017 · 10 comments
Closed

Internet Explorer 11 - A valid react element must be returned #238

scrambled2k3 opened this issue May 15, 2017 · 10 comments

Comments

@scrambled2k3
Copy link

I am getting this error when loading the Joyride component using IE11. Everything works fine in Chrome, Safari and Edge though.

SCRIPT5022: Joyride.render(): A valid React element (or null) must be returned. You may have returned undefined, an array or some other invalid object.

Joyride: 1.10.1
React: 15.5.4

@jjordy
Copy link

jjordy commented May 18, 2017

@scrambled2k3 did you find a solution to this?? I just ran into the same issue.

@scrambled2k3
Copy link
Author

unfortunately no

@jjordy
Copy link

jjordy commented May 18, 2017

@scrambled2k3 Ill let you know what I find.

@lukaszlipinski
Copy link

+1 works fine everywhere beside IE11

@ghost
Copy link

ghost commented Jun 11, 2017

+1

@AndrewStobie
Copy link

Did anyone ever find a solution to this? I'm still having this same problem.

@AndrewStobie
Copy link

I had some success updating my babel-core and probably more specifically to react 15.5 and it seemed to work that way. If I figure out the exact fix I'll let you know.

@gilbarbara
Copy link
Owner

In production builds too or just in development?
The demo works for me in IE11. It does not work for you?

Can you please provide a demo?
Feel free to re-open when you do.

@mchlltt
Copy link

mchlltt commented Dec 21, 2017

👋 In case anyone happens on this issue, I wanted to post the fix that I found. This issue in the React repo addresses the issue more generally: facebook/react#8379. The short version, as best I can explain it: React and ReactDOM were loading before babel-polyfill, which led to React's and/or ReactDOM's function for testing the validity of an element not being transpiled properly. Moving babel-polyfill to the first item in my webpack configuration ensured that React and ReactDOM were transpiled properly. The Joyride component is now correctly identified as a valid React element, and the tour is now behaving as expected in IE11, as well as Chrome, Firefox, and Safari.

(FYI, the issue was present in both dev and prod builds, and I am using React 15.6.2, Joyride 1.10.1, Webpack 3.5.6, babel-core & babel-polyfill 6.26.0)

@rafallyczkowski
Copy link

@mchlltt THANK YOU! You saved my production!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants