ex: dist資料夾有一個folder叫 LunaCute
後來改成 lunaCute之後,
git 無法判斷 lunaCute的 L變成大寫了
所以再怎麼push,還是一樣會是小寫
這時候可以:刪除整個資料夾,push(刪掉的進度),之後再再推新的資料夾上去
JavaScript Tips
To remove array duplicates in #javascript, you can use the filter() method. The indexOf is checking if there is occurrence of the looped item within the array. If it doesn't pass the check, it will be filtered out ✨
🍎 Code notes:https://t.co/1XpDp6YDSH pic.twitter.com/v8ir61kMk1
— Samantha Ming (@samantha_ming) August 6, 2020
React Router教學
Route Matchers
幾乎是最重要的部份!連結要「深入淺出」
<Route path="/contact/:id">
<Contact />
</Route>
<Route path="/contact">
<AllContacts />
</Route>
在這裡如果連結是 /contact/luna
那
<Route path="/contact">
要放在
<Route path="/contact/:id">
的下面,這是優先層級的概念。(所以根目錄一定要放在最下面)連結位置要由細到粗,除非加了exact
Switch 包住依網址不同,需要動態呈現的區域,
另外根路徑通常都會加上exact。為啥哩。因為所有網址都match押!
有做lazy loading的網站
https://stripe.com/docs
安裝最新套件
先刪除舊的!
rm -rf node_modules/
或是 npm uninstall xxx
再npm install 之後
再手動安裝
npm install git+ssh://git@lunacute.com/jelly.git
就會裝到最新版本了~就跟安裝 react router一樣…裝其它的也是啦!
不用在那邊清啥快取、移除node.js了吧
要是還是沒有抓到,就重新run看看(指安裝這個套件的地方)
一些甜點
mock API
一些不錯的站站
Mocky: The world easiest & fastest tool to mock your APIs
response的參考:
https://jsonapi.org/examples/
Jira使用

Epic:類似一個里埕碑,可以以小專案名命名(feature release):odds Spread Setting, 帳戶中心、新增風控帳號…
Components: 類似樂高積木,可以用模組命名,例如:API、UI、購物車…
Label:類似關鍵字,hashtag,方便搜尋用
參考:
https://moduscreate.com/blog/jira-using-epics-vs-components-vs-labels/
screen 指令
screen -S 23536.component -X quit