mirror of
https://github.com/KazooTTT/kazoottt-blog-v2.git
synced 2025-06-25 03:31:29 +08:00
Update docs and sort content
This commit is contained in:
@ -18,7 +18,7 @@ category: 旅行
|
||||
toAstro: true
|
||||
astroType: "post"
|
||||
date_created: 2024-12-02T11:03:22+08:00
|
||||
date_modified: 2025-02-05T21:48:36+08:00
|
||||
date_modified: 2025-02-07T11:17:03+08:00
|
||||
---
|
||||
|
||||
## 奶茶与咖啡
|
||||
|
@ -17,7 +17,7 @@ category: 旅行
|
||||
toAstro: true
|
||||
astroType: "post"
|
||||
date_created: 2024-09-10T19:38:05+08:00
|
||||
date_modified: 2025-02-05T21:51:45+08:00
|
||||
date_modified: 2025-02-07T11:17:03+08:00
|
||||
---
|
||||
|
||||
## 2023-09-30
|
||||
|
@ -16,7 +16,7 @@ banner: https://pictures.kazoottt.top/2024/10/20241017-5eef043c1bc397df87b6be5f1
|
||||
toAstro: true
|
||||
astroType: "post"
|
||||
date_created: 2024-09-03T21:00:57+08:00
|
||||
date_modified: 2025-01-22T13:39:20+08:00
|
||||
date_modified: 2025-02-07T11:17:03+08:00
|
||||
---
|
||||
|
||||
**# **2023 成都跨年\*\*\*\*
|
||||
|
@ -16,7 +16,7 @@ finished: true
|
||||
toAstro: true
|
||||
astroType: "post"
|
||||
date_created: 2025-01-04T11:34:08+08:00
|
||||
date_modified: 2025-02-05T23:08:08+08:00
|
||||
date_modified: 2025-02-07T11:16:10+08:00
|
||||
---
|
||||
|
||||
# 2023-W10
|
||||
|
@ -19,7 +19,7 @@ finished: true
|
||||
toAstro: true
|
||||
astroType: "post"
|
||||
date_created: 2025-01-04T11:34:08+08:00
|
||||
date_modified: 2025-01-22T13:39:24+08:00
|
||||
date_modified: 2025-02-07T11:16:10+08:00
|
||||
---
|
||||
|
||||
# 2023-W11
|
||||
|
@ -15,7 +15,7 @@ finished: true
|
||||
toAstro: true
|
||||
astroType: "post"
|
||||
date_created: 2025-01-04T11:34:08+08:00
|
||||
date_modified: 2025-01-22T13:39:24+08:00
|
||||
date_modified: 2025-02-07T11:16:10+08:00
|
||||
---
|
||||
|
||||
# 2023-W45 平淡的一周
|
||||
|
@ -15,7 +15,7 @@ finished: true
|
||||
toAstro: true
|
||||
astroType: "post"
|
||||
date_created: 2025-01-04T11:34:08+08:00
|
||||
date_modified: 2025-01-22T13:39:24+08:00
|
||||
date_modified: 2025-02-07T11:16:10+08:00
|
||||
---
|
||||
|
||||
# 2023-W46 开始接触理财和 Web3 2023-11-19
|
||||
|
@ -26,7 +26,7 @@ tags:
|
||||
toAstro: true
|
||||
astroType: "post"
|
||||
date_created: 2025-01-04T11:34:08+08:00
|
||||
date_modified: 2025-01-22T13:39:24+08:00
|
||||
date_modified: 2025-02-07T11:16:10+08:00
|
||||
---
|
||||
|
||||
# 2023-W48 转岗了
|
||||
|
@ -20,7 +20,7 @@ rinId: 1
|
||||
toAstro: true
|
||||
astroType: "post"
|
||||
date_created: 2024-09-03T21:00:57+08:00
|
||||
date_modified: 2025-01-22T13:39:20+08:00
|
||||
date_modified: 2025-02-07T11:17:03+08:00
|
||||
---
|
||||
|
||||

|
||||
|
@ -13,7 +13,7 @@ category: 旅行
|
||||
toAstro: true
|
||||
astroType: "post"
|
||||
date_created: 2024-09-10T19:38:05+08:00
|
||||
date_modified: 2025-02-05T21:48:37+08:00
|
||||
date_modified: 2025-02-07T11:17:03+08:00
|
||||
---
|
||||
|
||||
趁着生日假去了一趟香港,虽然因为某些业务需求一直都想去一趟,也在去年就办好了通行证。但是真正做决定到买机票订酒店只提前了一周,算是非常冲动的决定。
|
||||
|
@ -20,7 +20,7 @@ banner: https://pictures.kazoottt.top/2024/09/20240902-41822c72da727100ce156e6e1
|
||||
toAstro: true
|
||||
astroType: "post"
|
||||
date_created: 2024-09-03T21:00:57+08:00
|
||||
date_modified: 2025-01-22T13:39:20+08:00
|
||||
date_modified: 2025-02-07T11:17:03+08:00
|
||||
---
|
||||
|
||||

|
||||
|
@ -18,7 +18,7 @@ rinId: 5
|
||||
toAstro: true
|
||||
astroType: "post"
|
||||
date_created: 2024-09-10T19:38:05+08:00
|
||||
date_modified: 2025-01-22T13:39:20+08:00
|
||||
date_modified: 2025-02-07T11:17:03+08:00
|
||||
---
|
||||
|
||||
2024-07-08 提前致歉🙇♀️流水账难产了,而且记忆模糊,好多吃的名字都不记得了,所以内容写的真的很水。后面想起来了再慢慢补充吧。
|
||||
|
@ -25,7 +25,7 @@ finished: true
|
||||
toAstro: true
|
||||
astroType: "post"
|
||||
date_created: 2025-01-04T11:34:08+08:00
|
||||
date_modified: 2025-01-22T13:39:24+08:00
|
||||
date_modified: 2025-02-07T11:16:10+08:00
|
||||
---
|
||||
|
||||
# 2024-W02
|
||||
|
@ -28,7 +28,7 @@ tags:
|
||||
toAstro: true
|
||||
astroType: "post"
|
||||
date_created: 2025-01-04T11:34:08+08:00
|
||||
date_modified: 2025-01-22T13:39:23+08:00
|
||||
date_modified: 2025-02-07T11:16:10+08:00
|
||||
---
|
||||
|
||||
[[2024-W03]]
|
||||
@ -238,4 +238,4 @@ Chain-of-Table: Evolving Tables in the Reasoning Chain for Table Understanding
|
||||
|
||||
[Notebook](https://github.com/FullStackRetrieval-com/RetrievalTutorials/blob/main/5_Levels_Of_Text_Splitting.ipynb?continueFlag=61db114b5bb3eda119c3b0a42a3f0791)
|
||||
|
||||
### [温故而知新:大模型RAG问答研发的7个失分点及MOE专家组合模型的若干浅析](https://mp.weixin.qq.com/s/1p2VtmU-ClPQP1jEchGpGQ)
|
||||
### [温故而知新:大模型RAG问答研发的7个失分点及MOE专家组合模型的若干浅析](https://mp.weixin.qq.com/s/1p2VtmU-ClPQP1jEchGpGQ)
|
@ -23,7 +23,7 @@ tags:
|
||||
toAstro: true
|
||||
astroType: "post"
|
||||
date_created: 2025-01-04T11:34:08+08:00
|
||||
date_modified: 2025-01-22T13:39:23+08:00
|
||||
date_modified: 2025-02-07T11:16:10+08:00
|
||||
---
|
||||
|
||||
# 2024-W03- 应用推荐篇
|
||||
|
@ -20,7 +20,7 @@ tags:
|
||||
toAstro: true
|
||||
astroType: "post"
|
||||
date_created: 2025-01-04T11:34:08+08:00
|
||||
date_modified: 2025-01-22T13:39:23+08:00
|
||||
date_modified: 2025-02-07T11:16:10+08:00
|
||||
---
|
||||
|
||||
# 2024-W03- 推荐阅读篇
|
||||
@ -92,4 +92,4 @@ date_modified: 2025-01-22T13:39:23+08:00
|
||||
|
||||
## [API Vs SDK.](https://twitter.com/alexxubyte/status/1745847854961492384?s=12&t=UKmYswdLBh4dGuqwtKAXUA)
|
||||
|
||||
## [FFmpeg 教程](https://wklchris.github.io/blog/FFmpeg/)
|
||||
## [FFmpeg 教程](https://wklchris.github.io/blog/FFmpeg/)
|
@ -26,7 +26,7 @@ tags:
|
||||
toAstro: true
|
||||
astroType: "post"
|
||||
date_created: 2025-01-04T11:34:08+08:00
|
||||
date_modified: 2025-01-22T13:39:23+08:00
|
||||
date_modified: 2025-02-07T11:16:10+08:00
|
||||
---
|
||||
|
||||
# 2024-W03 编程篇
|
||||
@ -189,4 +189,4 @@ Konva.js 是一个 HTML5 Canvas JavaScript 框架,它通过为桌面和移动
|
||||
|
||||

|
||||
|
||||
## [使用 HTML、CSS 和 JavaScript 👨🏻💻 创建 3D 产品卡片](https://twitter.com/flexipletech/status/1745455790667030581?s=12&t=UKmYswdLBh4dGuqwtKAXUA)
|
||||
## [使用 HTML、CSS 和 JavaScript 👨🏻💻 创建 3D 产品卡片](https://twitter.com/flexipletech/status/1745455790667030581?s=12&t=UKmYswdLBh4dGuqwtKAXUA)
|
@ -17,7 +17,7 @@ tags:
|
||||
toAstro: true
|
||||
astroType: "post"
|
||||
date_created: 2025-01-04T11:34:08+08:00
|
||||
date_modified: 2025-01-22T13:39:23+08:00
|
||||
date_modified: 2025-02-07T11:16:10+08:00
|
||||
---
|
||||
|
||||
# 2024-W03- 设计篇
|
||||
|
@ -34,7 +34,7 @@ tags:
|
||||
toAstro: true
|
||||
astroType: "post"
|
||||
date_created: 2025-01-04T11:34:08+08:00
|
||||
date_modified: 2025-01-22T13:39:23+08:00
|
||||
date_modified: 2025-02-07T11:16:10+08:00
|
||||
---
|
||||
|
||||
# 2024-W03
|
||||
@ -314,4 +314,4 @@ Konva.js 是一个 HTML5 Canvas JavaScript 框架,它通过为桌面和移动
|
||||
|
||||
### [API Vs SDK.](https://twitter.com/alexxubyte/status/1745847854961492384?s=12&t=UKmYswdLBh4dGuqwtKAXUA)
|
||||
|
||||
### [FFmpeg 教程](https://wklchris.github.io/blog/FFmpeg/)
|
||||
### [FFmpeg 教程](https://wklchris.github.io/blog/FFmpeg/)
|
@ -17,7 +17,7 @@ rinId: 82
|
||||
toAstro: true
|
||||
astroType: "post"
|
||||
date_created: 2025-01-04T11:34:08+08:00
|
||||
date_modified: 2025-01-22T13:39:23+08:00
|
||||
date_modified: 2025-02-07T11:16:10+08:00
|
||||
---
|
||||
|
||||
# 2024-W08 推荐一些软件
|
||||
|
@ -31,7 +31,7 @@ rinId: 95
|
||||
toAstro: true
|
||||
astroType: "post"
|
||||
date_created: 2025-01-04T11:34:08+08:00
|
||||
date_modified: 2025-01-22T13:39:23+08:00
|
||||
date_modified: 2025-02-07T11:16:10+08:00
|
||||
---
|
||||
|
||||

|
||||
|
@ -23,7 +23,7 @@ rinId: 96
|
||||
toAstro: true
|
||||
astroType: "post"
|
||||
date_created: 2025-01-04T11:34:08+08:00
|
||||
date_modified: 2025-01-22T13:39:23+08:00
|
||||
date_modified: 2025-02-07T11:16:10+08:00
|
||||
---
|
||||
|
||||

|
||||
|
@ -20,7 +20,7 @@ rinId: 97
|
||||
toAstro: true
|
||||
astroType: "post"
|
||||
date_created: 2025-01-04T11:34:08+08:00
|
||||
date_modified: 2025-01-22T13:39:23+08:00
|
||||
date_modified: 2025-02-07T11:16:10+08:00
|
||||
---
|
||||
|
||||
日期范围:2024/04/22 - 2024/04/28
|
||||
|
@ -15,7 +15,7 @@ rinId: 98
|
||||
toAstro: true
|
||||
astroType: "post"
|
||||
date_created: 2025-01-04T11:34:08+08:00
|
||||
date_modified: 2025-01-22T13:39:23+08:00
|
||||
date_modified: 2025-02-07T11:16:10+08:00
|
||||
---
|
||||
|
||||
# 2024-W19
|
||||
|
@ -17,7 +17,7 @@ description: >-
|
||||
toAstro: true
|
||||
astroType: "post"
|
||||
date_created: 2025-01-04T11:34:08+08:00
|
||||
date_modified: 2025-01-22T13:39:23+08:00
|
||||
date_modified: 2025-02-07T11:16:10+08:00
|
||||
---
|
||||
|
||||
日期范围:2024/06/17 - 2024/06/23
|
||||
|
@ -18,7 +18,7 @@ description:
|
||||
toAstro: true
|
||||
astroType: "post"
|
||||
date_created: 2025-01-06T10:02:35+08:00
|
||||
date_modified: 2025-01-22T13:39:24+08:00
|
||||
date_modified: 2025-02-07T11:16:09+08:00
|
||||
---
|
||||
|
||||
[MUV家元旦24H限定食堂 - 汇总](https://milklovemuv.com/)
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
date_created: 2025-02-06T11:59:39+08:00
|
||||
date_modified: 2025-02-06T15:43:41+08:00
|
||||
date_modified: 2025-02-07T11:17:02+08:00
|
||||
title: Obsidian Web Clipper 离线阅读同人作品
|
||||
date: 2025-02-06
|
||||
author: KazooTTT
|
||||
|
169
src/content/post/Share My Incorrect Usage Cases of Zustand.md
Normal file
169
src/content/post/Share My Incorrect Usage Cases of Zustand.md
Normal file
@ -0,0 +1,169 @@
|
||||
---
|
||||
title: Share My Incorrect Usage Cases of Zustand
|
||||
date: 2024-12-17T00:00:00.000Z
|
||||
author: KazooTTT
|
||||
type: Post
|
||||
status: Published
|
||||
tags:
|
||||
- zustand
|
||||
- selector
|
||||
- store
|
||||
- react-scan
|
||||
- 最小粒度原则
|
||||
finished: true
|
||||
published: true
|
||||
category:
|
||||
slug: share-my-incorrect-usage-case-of-zustand?lang=en
|
||||
description: Zustand is a state management library that is simple and easy to use. It allows you to access the state via a single selector or shallow comparison to prevent unnecessary re-renders of all components. When the state is updated, you can use `useShallow` to retrieve only the required data. Additionally, you should follow the principle of minimal granularity, only fetching the necessary data instead of using multiple stores to manage different states. Moreover, state that is unrelated to the UI does not need to be accessed via a selector. The correct approach is to directly access the store within the `handleSave` method.
|
||||
toAstro: true
|
||||
date_created: 2025-01-04T11:44:53+08:00
|
||||
date_modified: 2025-02-07T11:45:53+08:00
|
||||
astroType: post
|
||||
---
|
||||
|
||||
## What is Zustand?
|
||||
|
||||
[Zustand](https://github.com/pmndrs/zustand) is a simple and easy-to-use state management library.
|
||||
|
||||
While using [react-scan](https://react-scan.com/), I noticed that when I updated a state in the store in component A, it caused a re-render of component B, leading to significant performance issues.
|
||||
|
||||
So, I revisited the documentation and realized that my previous usage of Zustand was incorrect.
|
||||
|
||||
## Mistake 1: Not using a single selector or shallow comparison to get state
|
||||
|
||||
Here’s the previous implementation and the corresponding component. `useGlobalStore` has more than just `uploadToServerProgress` and `uploadStatus` states.
|
||||
|
||||
```tsx
|
||||
const ComponentA = () => {
|
||||
const { uploadToServerProgress, uploadStatus } = useGlobalStore();
|
||||
return (
|
||||
<UploadStateContainer
|
||||
uploadToServerProgress={uploadToServerProgress}
|
||||
uploadStatus={uploadStatus}
|
||||
/>
|
||||
);
|
||||
};
|
||||
```
|
||||
|
||||
When `uploadToServerProgress` or `uploadStatus` is updated, `UploadStateContainer` re-renders (as expected). But when other states in `useGlobalStore` are updated, `UploadStateContainer` also re-renders (which is not expected).
|
||||
|
||||
This is because `const { uploadToServerProgress, uploadStatus } = useGlobalStore();` is shorthand for destructuring, which is equivalent to:
|
||||
|
||||
```tsx
|
||||
const globalStore = useGlobalStore();
|
||||
const { uploadToServerProgress, uploadStatus } = globalStore;
|
||||
```
|
||||
|
||||
In React, any update to `globalStore` triggers a re-render of `UploadStateContainer`. Therefore, we need to modify it as follows:
|
||||
|
||||
### Solution 1: Use a single selector
|
||||
|
||||
```ts
|
||||
const uploadToServerProgress = useGlobalStore(state => state.uploadToServerProgress);
|
||||
const uploadStatus = useGlobalStore(state => state.uploadStatus);
|
||||
```
|
||||
|
||||
### Solution 2: Use `useShallow`
|
||||
|
||||
```ts
|
||||
const { uploadToServerProgress, uploadStatus } = useGlobalStore(useShallow(state => ({
|
||||
uploadToServerProgress: state.uploadToServerProgress,
|
||||
uploadStatus: state.uploadStatus,
|
||||
})));
|
||||
```
|
||||
|
||||
## Mistake 2: Not having sufficient granularity when using selectors
|
||||
|
||||
`cameraData` is obtained by subscribing to other services and contains data such as camera image and camera ID. The camera image is frequently updated data.
|
||||
|
||||
```tsx
|
||||
import React from 'react';
|
||||
|
||||
export interface CameraData {
|
||||
cameraBase64: string; // base64 encoded image
|
||||
cameraId: number;
|
||||
}
|
||||
|
||||
const CurrentCamera: React.FC = () => {
|
||||
const cameraData = useGlobalStore(state => state.cameraData);
|
||||
|
||||
return <CurrentCameraId cameraId={cameraData.cameraId} />;
|
||||
};
|
||||
```
|
||||
|
||||
Though this is using a single selector, when `cameraBase64` updates, `cameraData` will also update, causing `CurrentCameraId` to re-render.
|
||||
|
||||
To solve this, follow the principle of minimal granularity and only fetch the required data:
|
||||
|
||||
```tsx
|
||||
import React from "react";
|
||||
|
||||
export interface CameraData {
|
||||
cameraBase64: string; // base64 encoded image
|
||||
cameraId: number;
|
||||
}
|
||||
|
||||
const CurrentCamera: React.FC = () => {
|
||||
const cameraId = useGlobalStore(state => state.cameraData.cameraId);
|
||||
|
||||
return <CurrentCameraId cameraId={cameraId} />;
|
||||
};
|
||||
```
|
||||
|
||||
## Mistake 3: Using multiple stores to manage different states, instead of using slices to group states
|
||||
|
||||
In the official documentation [Flux-inspired practice - Zustand](https://zustand.docs.pmnd.rs/guides/flux-inspired-practice), it is mentioned that you should use a single store, not multiple stores for different states.
|
||||
|
||||
> **Recommended patterns**
|
||||
>
|
||||
> **Single store**
|
||||
>
|
||||
> Your application's global state should be located in a single Zustand store.
|
||||
>
|
||||
> If you have a large application, Zustand supports splitting the store into slices.
|
||||
|
||||
## Mistake 4: Accessing UI-unrelated state via selectors
|
||||
|
||||
In a component, I had a `handleSave` method that called an API to save data.
|
||||
|
||||
Previously, I accessed the needed data through a selector within component A and then called the API to save it. But this was incorrect.
|
||||
|
||||
```tsx
|
||||
const ComponentA = () => {
|
||||
const { state1, state2 } = useGlobalStore(
|
||||
useShallow(state => ({
|
||||
state1: state.state1,
|
||||
state2: state.state2,
|
||||
}))
|
||||
);
|
||||
|
||||
const handleSave = () => {
|
||||
save(state1, state2);
|
||||
};
|
||||
|
||||
return <SaveButton onClick={handleSave} />;
|
||||
};
|
||||
```
|
||||
|
||||
In component B, I changed `state1`, but since I accessed `state1` in component A, the change would cause component A to re-render.
|
||||
|
||||
The correct approach is to directly access the store inside the `handleSave` method instead of passing the state via selectors:
|
||||
|
||||
```tsx
|
||||
const ComponentA = () => {
|
||||
const handleSave = () => {
|
||||
const { state1, state2 } = useGlobalStore.getState();
|
||||
save(state1, state2);
|
||||
};
|
||||
|
||||
return <SaveButton onClick={handleSave} />;
|
||||
};
|
||||
```
|
||||
|
||||
## References
|
||||
|
||||
[Zustand](https://zustand-demo.pmnd.rs/)
|
||||
|
||||
[master branch notes/zustand learning notes](https://github.com/puxiao/notes/blob/master/zustand%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0.md)
|
||||
|
||||
[How to efficiently manage React local state? This time I chose Zustand! | Bosh's Technical Exploration Notes](https://notes.boshkuo.com/docs/React/zustand#%E7%82%BA%E4%BD%95%E9%81%B8%E6%93%87%E4%BD%BF%E7%94%A8-zustand-)
|
@ -16,7 +16,7 @@ toAstro: true
|
||||
astroType: "post"
|
||||
category: 年报
|
||||
date_created: 2025-01-04T11:34:09+08:00
|
||||
date_modified: 2025-01-22T13:39:23+08:00
|
||||
date_modified: 2025-02-07T11:16:09+08:00
|
||||
---
|
||||
|
||||
# Y1-2020 年度总结
|
||||
|
@ -16,7 +16,7 @@ toAstro: true
|
||||
astroType: "post"
|
||||
category: 年报
|
||||
date_created: 2025-01-04T11:34:09+08:00
|
||||
date_modified: 2025-01-22T13:39:23+08:00
|
||||
date_modified: 2025-02-07T11:16:09+08:00
|
||||
---
|
||||
|
||||
# Y2-2021 年度总结
|
||||
@ -98,7 +98,6 @@ date_modified: 2025-01-22T13:39:23+08:00
|
||||
一些数据
|
||||
|
||||
1. 微信读书
|
||||
|
||||
1. 2020 122h
|
||||
2. 2021 32h
|
||||
3. 2022 29h
|
||||
@ -115,7 +114,6 @@ date_modified: 2025-01-22T13:39:23+08:00
|
||||
4. 2019 195h
|
||||
5. 2018 327h
|
||||
6. 2017 30h
|
||||
|
||||
3. github contributions
|
||||

|
||||
|
||||
|
@ -16,7 +16,7 @@ toAstro: true
|
||||
astroType: "post"
|
||||
category: 年报
|
||||
date_created: 2025-01-04T11:34:09+08:00
|
||||
date_modified: 2025-01-22T13:39:23+08:00
|
||||
date_modified: 2025-02-07T11:16:09+08:00
|
||||
---
|
||||
|
||||
# Y3-2022 年度总结
|
||||
@ -98,7 +98,6 @@ date_modified: 2025-01-22T13:39:23+08:00
|
||||
一些数据
|
||||
|
||||
1. 微信读书
|
||||
|
||||
1. 2020 122h
|
||||
2. 2021 32h
|
||||
3. 2022 29h
|
||||
@ -115,7 +114,6 @@ date_modified: 2025-01-22T13:39:23+08:00
|
||||
4. 2019 195h
|
||||
5. 2018 327h
|
||||
6. 2017 30h
|
||||
|
||||
3. github contributions
|
||||

|
||||
|
||||
|
@ -15,7 +15,7 @@ toAstro: true
|
||||
astroType: "post"
|
||||
category: 年报
|
||||
date_created: 2025-01-04T11:34:09+08:00
|
||||
date_modified: 2025-01-30T14:21:50+08:00
|
||||
date_modified: 2025-02-07T11:16:09+08:00
|
||||
---
|
||||
|
||||

|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
date_created: 2024-12-30T17:18:07+08:00
|
||||
date_modified: 2025-02-06T12:35:57+08:00
|
||||
date_modified: 2025-02-07T11:16:09+08:00
|
||||
title: Y5-2024年度总结
|
||||
date: 2025-01-30
|
||||
author: KazooTTT
|
||||
|
@ -17,7 +17,7 @@ description:
|
||||
toAstro: true
|
||||
astroType: "post"
|
||||
date_created: 2025-01-14T17:31:35+08:00
|
||||
date_modified: 2025-01-22T13:39:19+08:00
|
||||
date_modified: 2025-02-07T11:25:34+08:00
|
||||
---
|
||||
|
||||
when i use react-router and vite, i want to config my router in the router.config.ts file and also generate some config for the target path dir. (like the nextjs router which is automatically generated based on the file structure)
|
||||
|
@ -17,7 +17,7 @@ description: 最近帮朋友写了一个 ollama + excel 处理器,写完后发
|
||||
toAstro: true
|
||||
astroType: "post"
|
||||
date_created: 2025-01-07T23:09:15+08:00
|
||||
date_modified: 2025-01-22T13:39:22+08:00
|
||||
date_modified: 2025-02-07T11:16:09+08:00
|
||||
---
|
||||
|
||||
最近帮朋友写了一个 ollama + excel 处理器,写完后发现类似于飞书多维表格的 ai 功能。在开发和沟通过程中有一些感受。
|
||||
|
@ -20,7 +20,7 @@ description: >-
|
||||
toAstro: true
|
||||
astroType: "post"
|
||||
date_created: 2024-12-11T20:27:36+08:00
|
||||
date_modified: 2025-02-01T23:35:42+08:00
|
||||
date_modified: 2025-02-07T11:17:02+08:00
|
||||
---
|
||||
|
||||
很久之前做过一个 messauto 的安利
|
||||
|
@ -13,7 +13,7 @@ tags:
|
||||
toAstro: true
|
||||
astroType: "post"
|
||||
date_created: 2024-10-08T18:06:08+08:00
|
||||
date_modified: 2025-01-22T13:39:20+08:00
|
||||
date_modified: 2025-02-07T11:17:03+08:00
|
||||
---
|
||||
|
||||
# 一次受骗经历
|
||||
|
@ -21,7 +21,7 @@ rinId: 42
|
||||
toAstro: true
|
||||
astroType: "post"
|
||||
date_created: 2024-12-17T13:34:45+08:00
|
||||
date_modified: 2025-01-22T13:39:19+08:00
|
||||
date_modified: 2025-02-07T11:17:02+08:00
|
||||
---
|
||||
|
||||
# 不推荐 macos 用户购买 focusee 的理由
|
||||
|
@ -17,7 +17,7 @@ description: 收集与hanser相关的开源项目
|
||||
toAstro: true
|
||||
astroType: "post"
|
||||
date_created: 2024-12-18T13:20:01+08:00
|
||||
date_modified: 2025-01-22T13:39:21+08:00
|
||||
date_modified: 2025-02-07T11:16:09+08:00
|
||||
---
|
||||
|
||||
## UnityURPToonLitShader
|
||||
|
@ -16,7 +16,7 @@ category: 软件
|
||||
toAstro: true
|
||||
astroType: "post"
|
||||
date_created: 2025-02-05T12:56:51+08:00
|
||||
date_modified: 2025-02-05T12:58:40+08:00
|
||||
date_modified: 2025-02-07T11:17:02+08:00
|
||||
---
|
||||
|
||||
## 软件工具(电脑端)
|
||||
|
@ -16,7 +16,7 @@ description: >-
|
||||
这次五一,上海、重庆、成都的旅途就要开始了。4月30号下班回家后发现浦东机场有办公桌可以使用,并且充电。接着,我们抵达重庆,并前往成都。沿途我们顺带吃了美蛙鱼头和豆花饭,晚上妈妈做的菜很好吃。出发前忘记在候车厅拿包子,这次是赶紧去取了。到成都后与朋友聚会,
|
||||
afterwards我们去了天府红逛了,顺便吃了一顿超大份的自贡菜,也去了烤羊肉店。最后我们去南川看望了老家,很遗憾时间不多了。
|
||||
date_created: 2024-11-30T13:40:05+08:00
|
||||
date_modified: 2025-02-05T21:51:35+08:00
|
||||
date_modified: 2025-02-07T11:17:03+08:00
|
||||
toAstro: true
|
||||
astroType: "post"
|
||||
---
|
||||
|
@ -25,7 +25,7 @@ description: >-
|
||||
toAstro: true
|
||||
astroType: "post"
|
||||
date_created: 2025-01-04T11:44:53+08:00
|
||||
date_modified: 2025-01-22T13:39:19+08:00
|
||||
date_modified: 2025-02-07T11:25:34+08:00
|
||||
---
|
||||
|
||||
## github action
|
||||
|
@ -15,7 +15,7 @@ category: 推荐
|
||||
toAstro: true
|
||||
astroType: "post"
|
||||
date_created: 2025-01-04T11:34:08+08:00
|
||||
date_modified: 2025-02-06T13:55:41+08:00
|
||||
date_modified: 2025-02-07T11:17:01+08:00
|
||||
---
|
||||
|
||||
# 值得一看的 blog
|
||||
|
@ -14,7 +14,7 @@ description: 自动化微博浏览顺序脚本,快速轻松调整微博的浏
|
||||
toAstro: true
|
||||
astroType: "post"
|
||||
date_created: 2024-12-02T11:03:24+08:00
|
||||
date_modified: 2025-01-22T13:39:24+08:00
|
||||
date_modified: 2025-02-07T11:16:09+08:00
|
||||
---
|
||||
|
||||
# 写一个油猴脚本,自动地选择最新微博
|
||||
|
@ -18,7 +18,7 @@ description: zustand 是一个状态管理库,简单易用。它可以通过
|
||||
toAstro: true
|
||||
astroType: "post"
|
||||
date_created: 2025-01-04T11:44:53+08:00
|
||||
date_modified: 2025-02-03T19:30:01+08:00
|
||||
date_modified: 2025-02-07T11:17:02+08:00
|
||||
banner: https://pictures.kazoottt.top/2025/02/20250201-og-1738417688145.png
|
||||
---
|
||||
|
||||
@ -123,15 +123,15 @@ const CurrentCamera: React.FC = () => {
|
||||
|
||||
> [!quote]
|
||||
> Recommended patterns 推荐模式
|
||||
>
|
||||
>
|
||||
> Single store 单一存储
|
||||
>
|
||||
>
|
||||
> Your applications global state should be located in a single Zustand store.
|
||||
>
|
||||
>
|
||||
> 你的应用程序的全局状态应该位于一个单一的 Zustand 存储中。
|
||||
>
|
||||
>
|
||||
> If you have a large application, Zustand supports splitting the store into slices.
|
||||
>
|
||||
>
|
||||
> 如果你有一个大型应用程序,Zustand 支持将存储拆分为切片。
|
||||
|
||||
## 错误用法 4 与 UI 无关的 state 通过 selector 获取
|
||||
|
@ -22,7 +22,7 @@ NotionID-notionnext: 42131976-4124-47ec-aaad-2a9dfc0516d6
|
||||
link-notionnext: https://kazoottt.notion.site/42131976412447ecaaad2a9dfc0516d6
|
||||
rinId: 51
|
||||
date_created: 2025-01-04T11:34:08+08:00
|
||||
date_modified: 2025-01-22T13:25:22+08:00
|
||||
date_modified: 2025-02-07T11:25:34+08:00
|
||||
toAstro: true
|
||||
astroType: "post"
|
||||
---
|
||||
|
@ -15,7 +15,7 @@ description:
|
||||
toAstro: true
|
||||
astroType: "post"
|
||||
date_created: 2025-01-12T23:58:48+08:00
|
||||
date_modified: 2025-01-22T13:39:19+08:00
|
||||
date_modified: 2025-02-07T11:17:03+08:00
|
||||
---
|
||||
|
||||
初三有个周五的下午,我妈陪我在学校开高中推免会,突然接到外公的电话说外婆失踪了。那个时候在旁边听到这个消息就觉得心里很不安,我妈拿起电话打给外婆但无人接听,因为她根本没带出门,我心里就更不安了。
|
||||
|
@ -15,7 +15,7 @@ category: 前端
|
||||
toAstro: true
|
||||
astroType: "post"
|
||||
date_created: 2025-01-04T11:44:53+08:00
|
||||
date_modified: 2025-02-01T21:51:32+08:00
|
||||
date_modified: 2025-02-07T11:17:02+08:00
|
||||
---
|
||||
|
||||
# 1 如何实现在 markdown 中渲染 iframe
|
||||
|
@ -23,7 +23,7 @@ category: 软件
|
||||
toAstro: true
|
||||
astroType: "post"
|
||||
date_created: 2024-12-17T13:34:45+08:00
|
||||
date_modified: 2025-01-22T13:39:19+08:00
|
||||
date_modified: 2025-02-07T11:17:02+08:00
|
||||
---
|
||||
|
||||
# 如何自动同步某个文件夹的图片到某个相册中
|
||||
|
@ -10,7 +10,7 @@ published: true
|
||||
slug: cover-generator
|
||||
description: 本收集涵盖了多个封面生成工具和资源,旨在帮助用户快速创建美观且专业的封面设计。这些工具包括在线封面生成器、设计模板库以及自定义封面设计的技巧和指南。无论是用于书籍、报告、社交媒体还是其他用途,这些资源都能满足不同用户的需求,提升视觉呈现效果。
|
||||
date_created: 2025-01-04T11:34:08+08:00
|
||||
date_modified: 2025-02-06T16:03:14+08:00
|
||||
date_modified: 2025-02-07T11:17:02+08:00
|
||||
type: Post
|
||||
status: Published
|
||||
finished: true
|
||||
|
@ -18,7 +18,7 @@ link-notionnext: "https://kazoottt.notion.site/a4cf2259fba84b729513083a74b1ada1"
|
||||
toAstro: true
|
||||
astroType: "post"
|
||||
date_created: 2024-12-17T13:34:45+08:00
|
||||
date_modified: 2025-01-22T13:39:24+08:00
|
||||
date_modified: 2025-02-07T11:16:09+08:00
|
||||
---
|
||||
|
||||
# 微信读书网页版复制快捷键
|
||||
|
@ -18,7 +18,7 @@ category: 项目
|
||||
toAstro: true
|
||||
astroType: "post"
|
||||
date_created: 2024-12-02T11:03:24+08:00
|
||||
date_modified: 2025-01-22T13:39:24+08:00
|
||||
date_modified: 2025-02-07T11:16:09+08:00
|
||||
---
|
||||
|
||||
# Hide-your-twitter-info
|
||||
|
Reference in New Issue
Block a user