by   B.Muthukumaraswamy

Understanding

 

ES6

React

ReactNative & Redux

Contents

ES6 -    Advanced JavaScript features

 

React fundamentals What React really does

React Native Framework for building native mobile apps using React

Redux State management library we use for React Native

  • Next version of JavaScript
  • All of ES5  works in ES6
  • Mostly just syntax sugar - can do everything in plain ES5
  • Works out of the box in React Native

ES6

Arrow functions

Nicer syntax for anonymous functions

// ES5
function (x, y) {
  return x + y
}
// ES6
(x, y) => x + y
// Example
var bozoItems = items.filter(item => item.is_bozo)
// Can also use multiline.
var sum = (x, y) => {
  console.log('The sum is...')
  return x + y
}
    

deck

By Muthu Kumar

deck

  • 63