Make an app with React
Babel
JavaScript Preprocessor
Babel是一个广泛使用的转码器,可以将ES6代码转为ES5代码,从而在现有环境执行。
goo.gl/TT6zQ9q
What is React and its purpose
React is a Javascript library
React's ultimate purpose is to show content(HTML) to users and handle user interaction
Redux
Redux is a javaScript library ,and it often work with React
Why didn't we use Redux to make that app
React can work by itself
but it can also work with a tremendous variety of other libraries,packages,servers,and databases
what was the 'class' thing?
A javascript 'class'
React 'components' are made using either Javascript function or classes
what was the HTML looking stuff?
JSX
It looks like HTML and can be placed in Javascript code. Determines the content of our React app just like normal HTML
why did we add two libraries(React and ReactDOM)
React is split into two separate libraries
'React' knows what a component is and how to make components work together
'ReactDOM' knows how to take a component and make it show up in the DOM
JavaScript 中var、let、const区别
使用var声明的变量,其作用域为该语句所在的函数内,且存在变量提升现象;
使用let声明的变量,其作用域为该语句所在代码块内,不存在变量提升
使用const声明的变量,在后面出现的代码中不能再修改该常量的值