摘要: 1. 需要将React App 和 Server 一同启动,所以需要安装currently 这个package 2. 千万不要将server端 node_modules 加入.gitignore列表,否则部署后会导致找不到Mongoose package 3. 需要在React package.js 阅读全文
posted @ 2021-03-30 17:57 wikiwi 阅读(106) 评论(0) 推荐(0)
摘要: https://daveceddia.com/deploy-react-express-app-heroku/ You’ve got a React app, and an API server written in Express or something else. Now – how do y 阅读全文
posted @ 2021-03-30 17:52 wikiwi 阅读(167) 评论(0) 推荐(0)
摘要: 主要分这两步: 1. git rm -r --cached git add . 2. git commit -am "Remove ignored files" 阅读全文
posted @ 2021-03-28 08:52 wikiwi 阅读(148) 评论(0) 推荐(0)
摘要: 使用 npm install express-generator -g 进行安装的时候发现如下权限错误: npm ERR! code EACCES npm ERR! syscall access npm ERR! path /usr/local/lib/node_modules npm ERR! e 阅读全文
posted @ 2021-03-27 15:09 wikiwi 阅读(283) 评论(0) 推荐(0)
摘要: weed out: 淘汰: Algorithm problems are used to weed out unqualified candidates stress out: 担心,紧张 例句: If you don't get it right away, don't stress out 阅读全文
posted @ 2020-12-20 15:32 wikiwi 阅读(198) 评论(0) 推荐(0)
摘要: 一般而言,使用Onchange这种Event Handler,需要使用e.stopPropagation(); 具体代码如下 export const handleOnchange = (setStateMethod) => (e) => { e.stopPropagation(); const { 阅读全文
posted @ 2020-07-24 07:07 wikiwi 阅读(723) 评论(0) 推荐(0)
摘要: 关于这种情况,一般使用useEffect hook, 监控props的动态即可, 如果有变化,就可以props转化为State, useEffect(() => { if (!customizedPage || !customizedEntriesInPage) { return; } setPag 阅读全文
posted @ 2020-07-24 06:52 wikiwi 阅读(4163) 评论(0) 推荐(0)
摘要: 最近在做项目中发现,如果Form需要居中的话,使用position: absolute 会有很多问题,还是倾向于使用margin: 0 auto; 我觉得这是最好的结局方式了 1 <div class="container"> 2 <div class="need-horizon-center">< 阅读全文
posted @ 2020-06-20 22:15 wikiwi 阅读(170) 评论(0) 推荐(0)