Fork me on github
上一页 1 2 3 4 5 6 ··· 19 下一页
摘要: ## 使用原子化 CSS 工具包 比如把常见的 flex 布局封装成一个类名,这样就可以直接在 HTML 中使用了。 ```css .flexCenter { display: flex; flex-direction: row; justify-content: center; align-ite 阅读全文
posted @ 2023-11-07 00:19 zjy4fun 阅读(14) 评论(0) 推荐(0) 编辑
摘要: <html> <head> <title>flex 中设置高度的问题</title> </head> <body> <!-- 1. 容器设置为 flex,设置宽高会有什么影响,父容器和子容器默认宽高是多少 2. 如果容器宽高使用百分比表示,会有什么不同和影响? --> <div class="con 阅读全文
posted @ 2023-11-07 00:12 zjy4fun 阅读(218) 评论(0) 推荐(0) 编辑
摘要: 设置宽高 w-number, h-number flex 实现水平垂直居中 flex设置容器为 flex 容器 flex-row / flex-col 设置主轴方向 justify-center 设置主轴方向居中,类似还有 justify-start, justify-end items-cente 阅读全文
posted @ 2023-11-01 22:09 zjy4fun 阅读(136) 评论(0) 推荐(0) 编辑
摘要: redux 是一个状态管理库,独立存在,可以借助 react-redux 库与 react 配合使用。 介绍几个概念: store 包含状态数据,所有组件可以访问并操作里面的状态数据 action 描述了发生了什么动作和事情,不包含状态本身 reducer 纯函数,接受当前状态和一个动作作为参数,并 阅读全文
posted @ 2023-10-29 01:02 zjy4fun 阅读(9) 评论(0) 推荐(0) 编辑
摘要: 1. prettier 的配置文件有几种格式,先按照官方文档 配置好 2. 如果想按住 Ctrl + Alt + L 格式化代码,需要关闭 vscode 中的 formatOnSave 3. 每次修改完设置需要重启 vscode,这里重启的正确步骤:File -> Close Folder,再重新打 阅读全文
posted @ 2023-10-19 23:35 zjy4fun 阅读(174) 评论(0) 推荐(0) 编辑
摘要: 参考: https://www.ruanyifeng.com/blog/2018/07/indexeddb.html https://zh.javascript.info/indexeddb https://developer.mozilla.org/en-US/docs/Web/API/Index 阅读全文
posted @ 2023-10-14 17:08 zjy4fun 阅读(6) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2023-10-06 15:29 zjy4fun 阅读(3) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2023-10-01 17:28 zjy4fun 阅读(22) 评论(0) 推荐(0) 编辑
摘要: https://github.com/zjy4fun/notes/issues/62 React 18 提出的新特性“并发渲染”,为了防止组件重复挂载的问题,React 在开发模式 && 严格模式下,useEffect 会执行两次(模拟组件挂载和组件卸载,让问题提早暴露),但是线上模式不会。 开发模 阅读全文
posted @ 2023-10-01 16:46 zjy4fun 阅读(329) 评论(0) 推荐(0) 编辑
摘要: 参考: https://reactnative.cn/docs/intro-react-native-components 阅读全文
posted @ 2023-09-18 22:25 zjy4fun 阅读(3) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 19 下一页