xcatliu / react-ie8

Make your React app work in IE8
http://react-ie8.xcatliu.com/
997 stars 162 forks source link

Is there a possibility to polyfill react 15? #30

Open dzcpy opened 8 years ago

dzcpy commented 8 years ago

(We won't actively remove IE 8–related code quite yet, but we will deprioritize new bugs that are reported. If you need to support IE 8 we recommend you stay on React v0.14.)

Officially it's said that IE8 is not supported but they will also not remove IE 8 related compatibility code. So there might be a chance that it still works with polyfills?

dzcpy commented 8 years ago

If not, I'm thinking another solution which is by using IE's conditional comment. So if it's IE 8 then use a different webpack build. Any suggestions?

xcatliu commented 8 years ago

First thanks for you advice!

In my opinion, React@latest might still work fine in IE8 with some polyfills. But It's hard to find and fix every IE8 issues in the future, especially without the official help.

Why not just use React@0.14 if you want to support IE8?

xcatliu commented 8 years ago

BTW, we have docs for React@0.14: http://react-ie8.xcatliu.com/react/

dzcpy commented 8 years ago

Thanks for the reply! Main reason: I don't like those data-reactid stuff attached in every DOM object. I'm also interestd with preact and react-light, not sure whether these libraries can be used with IE8. Both of them have very small code base (3kb for preact) so it's probably easier to do the polifill.

LouisStAmour commented 8 years ago

I'm similarly interested in moving to React 15 now, despite requirements to support IE 8, as Jest 14's new React Test Renderer requires and ships with 15.3.0, and lets you write snapshot tests: https://facebook.github.io/jest/blog/2016/07/27/jest-14.html

I've tried getting previous React Test Renderers to work in Jest and it's a radically different syntax, the support's just not there. It occurs to me that it might be possible to backport react-test-renderer to work with 0.14, but that should be weighed against running 15.3.0 and attempting for IE8 support anyway.