在了解什麼是render後,傑森從React官網看到另一個範例,有段文字這樣寫道: Component 使你可以將 UI 拆分成獨立且可複用的程式碼 什麼是...
但是有的時候我們只負責製作元件,並沒有辦法確認使用這個元件的人是不是在函式定義域內加工元件,這個時候該怎麼辦才能確保這個問題呢? 在Day.19,我們以元件...
回顧 React form & Controlled component 在上個章節中,我們學習到了在 React 中可以如何處理 form eleme...
這系列的程式碼在 https://github.com/DanSnow/ironman-2020/tree/master/static-site-genera...
在這個章節中,我們將介紹在 React 中 form 與 input 相關 element 的使用方式。 然而為何需要把 form 這類的 element 特別...
回顧提升 state 在上一章節中,我們介紹了何謂提升 state 以及為何要這麼做。 提升 state 的意思就是把 state 提升到所有有使用到此資料的...
回顧 Key 與 Diff 演算法 在上一個篇章中,我們簡介了 key 在 Virtual DOM diff 演算法中扮演的角色。 我們也了解到 key={in...
這系列的程式碼在 https://github.com/DanSnow/ironman-2020/tree/master/static-site-genera...
這系列的程式碼在 https://github.com/DanSnow/ironman-2020/tree/master/static-site-genera...
這系列的程式碼在 https://github.com/DanSnow/ironman-2020/tree/master/static-site-genera...
這系列的程式碼在 https://github.com/DanSnow/ironman-2020/tree/master/static-site-genera...
當一個 component 需要存取修改一份資料 / 狀態的時候,通常我們會把這份資料 / 狀態做成 state,讓該 component 自己維護資料的內容。...
這系列的程式碼在 https://github.com/DanSnow/ironman-2020/tree/master/static-site-genera...
這系列的程式碼在 https://github.com/DanSnow/ironman-2020/tree/master/static-site-genera...
這系列的程式碼在 https://github.com/DanSnow/ironman-2020/tree/master/static-site-genera...
這系列的程式碼在 https://github.com/DanSnow/ironman-2020/tree/master/static-site-genera...
這系列的程式碼在 https://github.com/DanSnow/ironman-2020/tree/master/static-site-genera...
這系列的程式碼在 https://github.com/DanSnow/ironman-2020/tree/master/static-site-genera...
為什麼用React? 我當初初學網頁時剛好聽到三大框架,那時就聽到React這個詞最有感覺,所以就一直寫React到現在了,如果說現在要我改寫其他框架的話,其實...
目前我們產生的 html 是寫死在程式中的,這篇要來讓使用者可以透過 ejs 的方式寫自己的樣版,不過我們實際要用的樣版引擎不是 ejs 而是 eta.js ,...