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

IE 8 support? Out of space error in Star Wars example #624

Closed
DylanSale opened this issue Nov 22, 2015 · 5 comments
Closed

IE 8 support? Out of space error in Star Wars example #624

DylanSale opened this issue Nov 22, 2015 · 5 comments

Comments

@DylanSale
Copy link

Does Relay support IE 8? I couldn't find a mention of it on the site anywhere, but I know React does (or did?)

In my testing with the Star Wars example, it is getting a stack overflow somewhere in React. It seems to be related to the route prop on the Relay.RootContainer. It gives Warning: Failed propType: Function expected, then the "out of stack space" error at app.js line 11918, character 15 (I'm not sure if this is useful due to webpack, but its in the finally block of the Transaction Mixin's perform method).

Stepping through it shows it is crashing somewhere in the validate prop methods when it is validating the route prop. I had trouble getting more details because IE8's developer tools are impossible to use.

EDIT:
Additionally, it seems that there is an infinite recursion where RelayQueryNode.create calls createNode which calls RelayQueryNode.create until it gets a stack overflow. This may be unrelated to the other issue, as it seems to happen when parsing the response from the server. It looks like on Chrome a completely different createNode function gets called. Really weird.

@shalomvolchok
Copy link

Same question here. Can we get Relay to support IE 8? We have React working with the polyfills, but can't seem to get Relay working... Is it a dead end, or some additional polyfills are needed?

@josephsavona
Copy link
Contributor

Thanks for your question. Unfortunately, we are unable to provide support for IE8. It may be possible to get Relay working on IE8 by using polyfills or workarounds, but we can't make guarantees that future changes won't cause a regression.

@DylanSale
Copy link
Author

Thanks for the reply. What is the lowest version you do support?

On Tue, 24 Nov 2015, 07:44 Joseph Savona notifications@github.com wrote:

Thanks for your question. Unfortunately, we are unable to provide support
for IE8. It may be possible to get Relay working on IE8 by using polyfills
or workarounds, but we can't make guarantees that future changes won't
cause a regression.


Reply to this email directly or view it on GitHub
#624 (comment).

@plievone
Copy link
Contributor

I was intrigued and got Star Wars example working in IE8 with a couple of changes:

  • You can get rid of infinite recursion by renaming createNode in RelayQuery.js. You can see the problem in built file, where the other createNode has also a local function name createNode (to be displayed in stack traces), confusing IE8 scopes. @josephsavona You may want to rename the outer createNode helper to avoid confusion?
  • You can use some IE8-compatible fetch polyfill instead of whatwg-fetch, such as fetch-polyfill, otherwise the data won't be available and only a blank page renders.

Haven't tested it further, but the example renders fine. There are proptype and contexttype validation warnings due to shims adding extra Symbol-related properties to RelayPropTypes.QueryConfig, and React shape validator doesn't check the hasOwnProperty. But they won't kill the page. There may well be other errors yet uncovered, though.

@josephsavona
Copy link
Contributor

For now, we're happy to accept PRs for supporting IE9 and above.

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

4 participants