DEV Community

Discussion on: Immutably updating JavaScript objects in ReasonML (BuckleScript)

Collapse
 
austindd profile image
Austin

This is really useful. I have been using this pattern for a little while now. But I do want to point out that Object.assign (the compiled JS function) is not available for Internet Explorer.

These days, most people are probably using transpilers like Babel somewhere in their build pipelines, but that's not true for everyone. BuckleScript does a great job of compiling mostly to the ES5 JS spec, but this is one case where it does not (it's specified in ES6), and it won't tell you about that ahead of time.

Just so people are aware...

Collapse
 
yawaramin profile image
Yawar Amin

Good point! I wasn't aware of that. Btw I think BuckleScript is looking to move forward with more ES6 features at some point–good to keep in mind for the future.