2. 介紹
React 是 Facebook 在 2013 年所發表的一個處理前
端 UI 的開源函式庫。
Solve one problem:
Building large applications with data that changes over
time
解決建置資料不斷更新的大型系統 前端瀏覽效以的問題
官方網站
13. Separate File
<script type="text/babel" src="src/helloworld.js"></script>
Note that some browsers (Chrome, e.g.) will fail to load the file unless
it's served via HTTP.
sample06-separate-file.htm
14. Component Lifecycle
Components have three main parts of their lifecycle:
Mounting: A component is being inserted into the DOM.
Updating: A component is being re-rendered to determine if the
DOM should be updated.
Unmounting: A component is being removed from the DOM.
will methods, which are called right before something happens.
did methods which are called right after something happens.
Mounting: A component is being inserted into the DOM.
Updating: A component is being re-rendered to determine if the DOM should be updated.
Unmounting: A component is being removed from the DOM.