Open stripethree opened 5 years ago
Pretty good introduction to using React with Rails here: https://www.youtube.com/watch?v=GW9qgIYfzEI
With the advent of ES6; writing JS code, and React in particular has become a joy for me. I've gone from a typical Rubyist attitude of "EWWWWW JAVASCRIPT" to "OH HELL YEAH JAVASCRIPT*".
*React
My personal favourite feature of ES6: https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/
I read the slug of that link as "es6 deep destructuring" where you can do this:
const {
ancestor: {
parent: {
child: {
body
}
}
}
} = largeObj;
which assigns body
to largeObj.ancestor.parent.child.body
... which is cool... but ill-advisable 😛
Suggested at the engineering team meeting on September 6