biubiubiu...
摘要: 作者【意】米凯莱·贝尔托利 译者:林昊 阅读时间:2021.01.28 ~ 第一章 React基础 关注点分离 2.React 声明式编程范式 命令式编程描述代码如何工作,而声明式编程则表明想要实现什么目的 声明式编程无需使用变量,也不用在执行过程中持续更新变量的值 使用声明式编程编程人员只需描述他 阅读全文
posted @ 2021-02-20 16:27 了恩 阅读(161) 评论(0) 推荐(0) 编辑
摘要: 注意: 后端的socket.io 和 前端的socket.io-client npm依赖包版本要对应,否则会出现connect失败的问题;语法也会有变化;个人使用的前后端版本均为2.2.0 报错如下: 修改后的代码: 阅读全文
posted @ 2021-02-19 16:53 了恩 阅读(163) 评论(0) 推荐(0) 编辑
摘要: 可选链操作符( ?. )允许读取位于连接对象链深处的属性的值,而不必明确验证链中的每个引用是否有效。?. 操作符的功能类似于 . 链式操作符,不同之处在于,在引用为空(nullish ) (null 或者 undefined) 的情况下不会引起错误,该表达式短路返回值是 undefined。与函数调 阅读全文
posted @ 2021-02-05 16:59 了恩 阅读(369) 评论(0) 推荐(0) 编辑
摘要: 注册npm账户 编写完代码 npm login -g --registry=http://repo.xxx.net/xx/xx Username:xx Password:xx Email:xx Loggined in as xx on http://repo.xxx.net/xx/xx npm pu 阅读全文
posted @ 2021-02-03 20:19 了恩 阅读(67) 评论(0) 推荐(0) 编辑
摘要: 使用 // 1. 安装 npm i -D eslint // 2. 配置package.json // 3. 使用 npm run lint:create // 4. 编写代码 // 5. lint npm run lint package.json配置 "scripts": { "lint": " 阅读全文
posted @ 2021-02-02 17:37 了恩 阅读(254) 评论(0) 推荐(0) 编辑
摘要: 一、thread-loader提高编译速度1. 安装: npm install --save-dev thread-loader 2. webpack.config.js 配置: module.exports = { module: { rules: [ { test: /\.js$/, inclu 阅读全文
posted @ 2021-02-01 15:52 了恩 阅读(72) 评论(0) 推荐(0) 编辑
摘要: 1. ** 2 ** 3 // 8 3 ** 2 // 9 2. Math.pow(基数,指数) Math.pow(2,3) //8 Math.pow(3,2) //9 阅读全文
posted @ 2021-01-28 19:54 了恩 阅读(538) 评论(0) 推荐(0) 编辑
摘要: 打包后用于发布npm包 babel src --out-dir dist --copy-files 打包后用户后端服务引用 webpack --progress --color --mode=production 阅读全文
posted @ 2021-01-22 18:09 了恩 阅读(73) 评论(0) 推荐(0) 编辑
摘要: 现象: 原因:端口被占用 阅读全文
posted @ 2021-01-21 14:25 了恩 阅读(93) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2021-01-19 11:15 了恩 阅读(132) 评论(0) 推荐(0) 编辑