babel-plugin-extensible-destructuring
babel-plugin-extensible-destructuring copied to clipboard
Not work: destruct function arguments with immutable objects
function read({a, b, c}) {
console.info(a) //ppp
console.info(b) //11
}
read({a: "ppp", b: 11})
function read({a, b, c}) {
console.info(a) //undefined
console.info(b) //undefined
}
read(fromJS({a: "ppp", b: 11}))
Now I have to destruct immutable objects inside the functions and it works prefectly:
function read(obj) {
const {a,b} = obj
...
}
+1
Whyyy!!!? .... :D no seriously why this hasn't been fixed yet?
@hendrul maybe because you haven't submitted your pull request yet?