part 1 - introduction
Binar::apps
Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine.
npm is the package manager for JavaScript.
A bundler for javascript and friends. Packs many modules into a few bundled assets.
parse ES6 syntax
// module imports
import moment from 'moment';
import _ from 'underscore';
import MyComponent from './MyComponent';
// const - cannot be reassigned
const height = 56;
// Arrow function
const getHeight = () => {
// Block variable
let newHeight = height * 2;
return height;
}
// export function from module
export default getHeight;
parse ES6 syntax
// Object spread
// const card = { name: 'test', title: 'MasterCard', number: '123456789', type: 'debit' };
const = {
name,
title,
number,
type
} = card;
///////
const myNumber = 54;
const myName = 'Mateusz';
const hash = { myName, myNumber };
Small reusable components
Virtual DOM
CSS
Cons