Closed stripethree closed 5 years ago
Comment by spaulsandhu Monday Sep 17, 2018 at 18:11 GMT
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
Comment by spaulsandhu Monday Sep 17, 2018 at 18:18 GMT
My personal favourite feature of ES6: https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/
Comment by codingmatty Tuesday Sep 18, 2018 at 20:10 GMT
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 😛
Issue by stripethree Monday Sep 17, 2018 at 17:52 GMT Originally opened as https://github.com/youearnedit/YEI-lunchnlearn/issues/3
Suggested at the engineering team meeting on September 6