摘要: 有两种方式可以定义路由:传递React Elements<Home />或传递React ComponentHome。但是如果它们同时存在,则以React Component优先。 缺点: 通过React Component方式定义无法传递props,可以考虑使用全局状态管理。 const elem 阅读全文
posted @ 2023-03-11 21:42 被咯苏州 阅读(148) 评论(0) 推荐(0) 编辑
摘要: 测试提了一个bug,说有页面在华为P8上空白页。 然后通过usb调试发现,该设备不支持const,let代码。原因找到了,接下来就是该怎么解决它。 找到问题代码 项目执行npm run build,接着在vscode上查询const 关键字。如下: 查询来源 点开39.xxxx.js。格式化下,搜索 阅读全文
posted @ 2022-07-01 21:35 被咯苏州 阅读(120) 评论(0) 推荐(0) 编辑
摘要: windows使用wsl2 clash for windows后无法使用微软商店等 clash for windows后无法使用微软商店等 找到 UWP Loopback 点击后面的 Launch Helper 找到 Exempt All 全部勾选后点击 Save Changes windows11 阅读全文
posted @ 2022-06-25 00:53 被咯苏州 阅读(1533) 评论(0) 推荐(0) 编辑
摘要: 原文链接 2022 年 3 月 29 日,React 18 正式版发布了。 新增了以下这些新功能 Concurrent Mode 并发模式 在 CM 模式下,React 在执行过程中,每执行一个 Fiber,都会看看有没有更高优先级的更新,如果有,则当前低优先级的的更新会被暂停,待高优先级任务执行完 阅读全文
posted @ 2022-04-29 11:37 被咯苏州 阅读(652) 评论(0) 推荐(0) 编辑
摘要: 原文链接 忽略$符号 在阅读 NPM 包的安装说明时,经常会看到如下内容: $ npm install some-package 你应该忽略$符号,输入它之后的所有内容。 它本质是一个符号,代表着我后面的内容是要在终端中运行的。 打印当前目录 pwd 查看当前目录内容 ls ls -la l 表示详 阅读全文
posted @ 2022-04-25 14:28 被咯苏州 阅读(112) 评论(0) 推荐(0) 编辑
摘要: 直入主题。源代码如下: class A{ aName = 'A' constructor(aAge){ this.aAge = aAge } static aStatic = 'aStatic' } class B extends A{ bName = 'b' constructor(bAge){ 阅读全文
posted @ 2022-04-14 16:07 被咯苏州 阅读(99) 评论(0) 推荐(0) 编辑
摘要: Promise是一个构造函数,excutor是他的执行函数,同时也是构造函数的参数. excutor有两个参数(resolve,reject) Promise的三种状态 pending,Promise初始化时是该状态 fulfilled,Promise成功时是该状态,调用resolve reject 阅读全文
posted @ 2020-02-17 10:15 被咯苏州 阅读(158) 评论(0) 推荐(0) 编辑
摘要: 以下是学习重点 "原文地址" 调度策略 Fiber 架构 阅读全文
posted @ 2019-12-09 14:48 被咯苏州 阅读(173) 评论(0) 推荐(0) 编辑
摘要: babel看源码 HTML+JS篇 // 通过link 预加载图片,文件等资源 https://developer.mozilla.org/zh-CN/docs/Web/HTML/Preloading_content // 微信授权无法跳转 https://my.oschina.net/u/1169 阅读全文
posted @ 2019-10-24 19:25 被咯苏州 阅读(197) 评论(0) 推荐(0) 编辑
摘要: ``` // 更新flutter flutter upgrade // Dart 构造函数默认值 ImageGridView({Key key, this.imgs, this.isEdit: false}) // flutter 更新包时卡死,命令行展示如下 Waiting for another flutter command to release the startup lock..... 阅读全文
posted @ 2019-08-26 14:06 被咯苏州 阅读(474) 评论(0) 推荐(0) 编辑