摘要:
zustand 渲染优化https://github.com/pmndrs/zustand?tab=readme-ov-file#selecting-multiple-state-slices useWhyDidYouUpdate,检查到底是哪些 prop 发生了 改变。https://zhuanl 阅读全文
摘要:
10.04 《React 面试题》学习 https://sorrycc.com/react-interview-questions/ 《React Hooks CheatSheet》学习 https://sorrycc.com/react-hooks-cheatsheet/ 阅读全文
摘要:
9.38 公司 https://bigfrontend.dev/zh/react 刷了 5 道题 学习了 useHooks https://github1s.com/uidotdev/usehooks/blob/HEAD/index.js 阅读全文
摘要:
10:24到公司 web-interview http系列完成 看完了https://github1s.com/timolins/react-hot-toast 源码 https://www.yuque.com/beilo/simpread/1705914485536?singleDoc# 《40 阅读全文
摘要:
9 :50 公司 《关于 React 组件组织和拆分。》几个思路,1)提取子组件以拆分视图,2)提取非视图逻辑到 hooks,3)提取领域模型以封装逻辑。但也要注意别过度抽象,个人感觉文中的抽象有些过,线性的逻辑更适合阅读。https://martinfowler.com/articles/modu 阅读全文
摘要:
9 点 26 解决了一个第三方库 require(xxxx) 导致的vite4 在 build时报错 Can't find variable: require https://github.com/vite-plugin/vite-plugin-commonjs 《代码提取》三种等级,导出提取、函数 阅读全文
摘要:
9 点 50 到公司 苹果醋中的醋酸可帮助改善身体的新陈代谢。 公司很忙。。。 注册了 cc 的 https://sorrycc.com。等待通过 看到一段很有意思的代码, useLayoutEffect 放在 if 中执行,原因是这段代码只在浏览器环境运行 https://github1s.com 阅读全文
摘要:
9.50 到公司 学习完《react.dev》https://react.dev 阅读全文
摘要:
9.48 到达公司 《如何在 2024 年编写 CSS 》https://sorrycc.com/css-2024/ CSS变量 (CSS Variables) .header { --main-bg-color: lightblue; } .header { background-color: v 阅读全文
摘要:
9.46 到公司 阅读《两个reacts》https://sorrycc.com/two-reacts/ 在今天的工作中遇到了两个场景,我想在这里进行简单的记录和分享,也许对你们也有所帮助。 假设在你的UI中有两个div元素,分别为a和b,其中b的定位方式设置为fixed。需求是当鼠标悬浮在a元素之 阅读全文