KazooHR / engineering-lunchnlearn

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

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

Open stripethree opened 5 years ago

stripethree commented 5 years ago

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

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

stripethree commented 5 years ago

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/

stripethree commented 5 years ago

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 😛