daniel-lundin / react-dom-confetti

Trigger confetti explosions on state transitions
623 stars 30 forks source link

SCRIPT5045: Assignment to read-only properties is not allowed in strict mode #7

Closed wojtekmaj closed 6 years ago

wojtekmaj commented 6 years ago

Hi! On Microsoft Edge, this is the error I'm getting ~1 second after clicking the button. Confetti never comes. :(

daniel-lundin commented 6 years ago

That's too bad :( Do you get any stack trace telling you where it happens? I don't have access to Edge a.t.m..

wojtekmaj commented 6 years ago

You apparently can't just apply new classList like that:

image

I guess you should use classList.add('fetti') for that. But whatever your transpiler does, breaks it up.

Stack is minified so there's not much of a use... :(

wojtekmaj commented 6 years ago

Actually, you have fixed it already, only your demo page still is not updated.

https://github.com/daniel-lundin/dom-confetti/commit/f0ca578d012d26034d3154268851ad7ee4a9eb35#diff-1c90ff38a08209f9ebd4d05d1e43358eL14

daniel-lundin commented 6 years ago

Ahh, yes I remember something about removing an unnecessary class. I will update the demo page, thanks for noticing!

wojtekmaj commented 6 years ago

FYI it's working like a charm, no more Edge-specific issues :)

daniel-lundin commented 6 years ago

Great, thanks fot acknowledging!