youearnedit / YEI-lunchnlearn

A place for tracking things we talk about, or want to talk about, at Lunch 'n' Learn.
2 stars 0 forks source link

React / getting started with front end for Rails developers #3

Open stripethree opened 5 years ago

stripethree commented 5 years ago

Suggested at the engineering team meeting on September 6

spaulsandhu commented 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

spaulsandhu commented 5 years ago

My personal favourite feature of ES6: https://hacks.mozilla.org/2015/05/es6-in-depth-destructuring/

codingmatty commented 5 years ago

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 😛