-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[v9.0.0-rc.3] useTransition fails to leave in IE11 #1012
Comments
@KB1RMA Your best bet is to transpile react-spring for ie11 in your webpack config, pass anything in that folder (/node_modules/react-spring) thru babel-loader. There is stuff in the cjs build that is gonna break ie11. Polyfilling via babel-'s core-js setup in your app is also a given. Originally posted by @tim-soft in #985 (comment) |
I just tried that and it's still broken in the same way unfortunately! Still no console errors either - silent failure. Edit: And yeah, everything else is all polyfilled properly - This is a pretty large project and this is my only IE11 issue. I just pulled a small reproduction out. Originally posted by @KB1RMA in #985 (comment) |
Maybe you messed up? How are you using Be sure every package in Originally posted by @aleclarson in #985 (comment) |
@KB1RMA this way has worked for me in the past (separate loaders + unix/windows path regex) webpack/webpack#2031 (comment) Originally posted by @tim-soft in #985 (comment) |
It's most entirely possible! I'm using Nextjs and Here's a CodeSandbox of essentially what I have setup: https://codesandbox.io/s/happy-breeze-p37cl?file=/next.config.js What's throwing me is plenty of other things appear to work okay. And it does animate, it just doesn't complete or unmount. And no console errors. Originally posted by @KB1RMA in #985 (comment) |
I had a little more time to dig into this so I want to provide a bit more information as it looks like more is broken than I initially had thought. I've confirmed I'm putting all the @react-spring libraries through babel-loader:
In addition to my initial example not unmounting, I've now noticed that this simple example only using Chrome outputs However IE outputs an empty array for import { useSpring, animated } from "@react-spring/web";
export default function App() {
const [hidden, setHidden] = React.useState(false);
const props = useSpring({ opacity: hidden ? 0 : 1 });
console.log(Object.keys(props));
return (
<div>
<animated.div style={props}>Some hide/show text</animated.div>
<button onClick={() => setHidden(!hidden)}>Show/Hide</button>
</div>
);
} |
@aleclarson I've been able to confirm this ultimately did end up being a polyfill issue and not related to transpilation. Nextjs had omitted 2 very specific polyfills from Definitely thanks to @tomdohnal for saving me from pulling my hair out trying to track this down. I think we can close this to tidy up your bug list |
When using
/web.cjs
I seem to be having an issue in IE11 where the element fades in, but won't fade out or unmount.Example component that fails to "leave" in IE
Everything appears to work without issue in all other browers I've tested so I'm guessing it's just a bug. There aren't any exceptions thrown.
Originally posted by @KB1RMA in #985 (comment)
The text was updated successfully, but these errors were encountered: