在createSlice裡面的initialState,記得如果有的值要設成null的話,它會沒辦法被destructuring出來。
例如 infoList: null
const { catList = [], dogList = [] } = infoList;
這時候就會報錯
所以要改用物件infoList: {}
在createSlice裡面的initialState,記得如果有的值要設成null的話,它會沒辦法被destructuring出來。
例如 infoList: null
const { catList = [], dogList = [] } = infoList;
這時候就會報錯
所以要改用物件infoList: {}
<label for="male">Male</label>
<input type="radio" name="gender" id="male" value="male">
<label>
Name:
<input type="text" name="name" />
</label>
HTML長這樣
label可以包住input,也可以不包
包住input就不用給for值了喔
記得for
對應的是id
radio的群組是用name來群組
There are 2 methods of labelling a form control using the HTML label element. You can wrap the control inside the label element or you can include the for
attribute on the label
element, which has a value matching the id
value of the control it is intended to label.
HTML5 Accessibility Chops: form control labeling
然後React版本的for
要用 htmlFor
然後點擊事件要綁在input
上面,不能綁在label
上
.push()
returns the length of the array after modification, not the array itself.
常用指令::wq
save and exit
:qa! exit Esc
back to normal modei
insert
在pick那邊按ctrl + A 可以切換狀態(pick、squash…)
參考文章
How to Save a File in Vim / Vi and Quit the Editor
How To Exit (Quit) Linux Vim/Vi Editor
另外還有Vim互動教學網站
Interactive Vim tutorial
Cambridge Dictionary
English Dictionary, Translations & Thesaurus
YourDictionary
Vocabulary.com – Learn Words – English Dictionary
Thesaurus.com
Merriam-Webster
Dictionary by Merriam-Webster: America’s most-trusted online dictionary
Collins Online Dictionary
海詞詞典在線詞典在線翻譯_海量正版權威詞典官方網站
https://telegramgroups.pinkjelly.org/
無聊寫的站站,收集一些Telegram群組
WebStorm快捷鍵
Ctrl + B | Go To Definition(Navigate to declaration) |
Alt + Enter | Show intention actions |
Alt + Shift + F10 | Run configurations |
Ctrl + W | Extend selection |
Alt + F12 | Open Terminal |
Shift + Alt + ↑↓ | Move Line Up/Down |
Ctrl + + | Expand |
Alt + 1 | Jump to Project |
Ctrl + F4 | Close Current File |
F9 | break point |
F5 | run debugger mode |
Shift + F5 | stop debugger |
Chrome 快捷鍵
Ctrl + PageUp / PageDown | 切換到上個分頁/下個分頁 |
Ctrl + W | 關閉目前分頁 |
Alt + D || Ctrl + L | 跳到網址列 |
書上提到的企業:
FirstBuild
Indiegogo
喜飛思分析
Civis Analytics
小松製作所
Komatsu Ltd.
書上提到的東西:
CuratedAI
AI的創作
Engadget