01 2024 档案

摘要:《react 使用小技巧》https://www.yuque.com/beilo/simpread/1706613177588 《webpack热更新原理》 https://github.com/febobo/web-interview/issues/126 Webpack Compile(webp 阅读全文
posted @ 2024-01-30 19:17 被咯苏州 阅读(130) 评论(0) 推荐(0) 编辑
摘要:zustand 渲染优化https://github.com/pmndrs/zustand?tab=readme-ov-file#selecting-multiple-state-slices useWhyDidYouUpdate,检查到底是哪些 prop 发生了 改变。https://zhuanl 阅读全文
posted @ 2024-01-25 19:00 被咯苏州 阅读(9) 评论(0) 推荐(0) 编辑
摘要:10.04 《React 面试题》学习 https://sorrycc.com/react-interview-questions/ 《React Hooks CheatSheet》学习 https://sorrycc.com/react-hooks-cheatsheet/ 阅读全文
posted @ 2024-01-24 19:34 被咯苏州 阅读(15) 评论(0) 推荐(0) 编辑
摘要:9.38 公司 https://bigfrontend.dev/zh/react 刷了 5 道题 学习了 useHooks https://github1s.com/uidotdev/usehooks/blob/HEAD/index.js 阅读全文
posted @ 2024-01-23 19:17 被咯苏州 阅读(14) 评论(0) 推荐(0) 编辑
摘要:10:24到公司 web-interview http系列完成 看完了https://github1s.com/timolins/react-hot-toast 源码 https://www.yuque.com/beilo/simpread/1705914485536?singleDoc# 《40 阅读全文
posted @ 2024-01-22 18:53 被咯苏州 阅读(60) 评论(0) 推荐(0) 编辑
摘要:9 :50 公司 《关于 React 组件组织和拆分。》几个思路,1)提取子组件以拆分视图,2)提取非视图逻辑到 hooks,3)提取领域模型以封装逻辑。但也要注意别过度抽象,个人感觉文中的抽象有些过,线性的逻辑更适合阅读。https://martinfowler.com/articles/modu 阅读全文
posted @ 2024-01-19 17:47 被咯苏州 阅读(7) 评论(0) 推荐(0) 编辑
摘要:9 点 26 解决了一个第三方库 require(xxxx) 导致的vite4 在 build时报错 Can't find variable: require https://github.com/vite-plugin/vite-plugin-commonjs 《代码提取》三种等级,导出提取、函数 阅读全文
posted @ 2024-01-19 17:46 被咯苏州 阅读(29) 评论(0) 推荐(0) 编辑
摘要:9 点 50 到公司 苹果醋中的醋酸可帮助改善身体的新陈代谢。 公司很忙。。。 注册了 cc 的 https://sorrycc.com。等待通过 看到一段很有意思的代码, useLayoutEffect 放在 if 中执行,原因是这段代码只在浏览器环境运行 https://github1s.com 阅读全文
posted @ 2024-01-15 19:04 被咯苏州 阅读(15) 评论(0) 推荐(0) 编辑
摘要:9.50 到公司 学习完《react.dev》https://react.dev 阅读全文
posted @ 2024-01-13 17:45 被咯苏州 阅读(12) 评论(0) 推荐(0) 编辑
摘要:9.48 到达公司 《如何在 2024 年编写 CSS 》https://sorrycc.com/css-2024/ CSS变量 (CSS Variables) .header { --main-bg-color: lightblue; } .header { background-color: v 阅读全文
posted @ 2024-01-12 18:28 被咯苏州 阅读(14) 评论(0) 推荐(0) 编辑
摘要:9.46 到公司 阅读《两个reacts》https://sorrycc.com/two-reacts/ 在今天的工作中遇到了两个场景,我想在这里进行简单的记录和分享,也许对你们也有所帮助。 假设在你的UI中有两个div元素,分别为a和b,其中b的定位方式设置为fixed。需求是当鼠标悬浮在a元素之 阅读全文
posted @ 2024-01-11 19:27 被咯苏州 阅读(4) 评论(0) 推荐(0) 编辑
摘要:9 点 40 到公司 学习 https://github.com/febobo/web-interview 。学习到了React diff的原理是什么。 学习了两篇文章《好文:介绍 React 的 cache 函数。》https://unicorn-utterances.com/posts/expl 阅读全文
posted @ 2024-01-10 18:43 被咯苏州 阅读(20) 评论(0) 推荐(0) 编辑
摘要:以下是具体的代码实现: const handleExportModal = async () => { const response = await getExportApi({ a: xxxxxxx, b: xxxxxx, }); const url = window.URL.createObje 阅读全文
posted @ 2024-01-09 19:54 被咯苏州 阅读(523) 评论(0) 推荐(0) 编辑
摘要:假设我们有一个 InputNumber,当进行操作1时,我们允许用户输入负数值,然而在进行操作2时,我们需要用户输入正整数。 我会用到一个名为 createValidator 的函数来实现这个需求。同时,我还会使用 Form.Item 的 dependencies 属性来更新 lowerLimitT 阅读全文
posted @ 2024-01-09 19:52 被咯苏州 阅读(140) 评论(0) 推荐(0) 编辑
摘要:在日常的项目开发中,我们经常会遇到需要对元素跟:hover 和 :active 有交互的情况。在多处写类似的代码既繁琐又容易引起代码冗余。那么我们如何解决这个问题呢? 当然,想象一下如果能有一种方法,让你在定义样式时只需写一次,又可以在任何需要的地方重用,会是多么理想。 首先,我们先来看看一段普通的 阅读全文
posted @ 2024-01-09 19:45 被咯苏州 阅读(169) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示