React

SWR 说:或许你真的不需要 Redux

By John Han
Picture of the author
Published on
image alt attribute

SWR 说:或许你真的不需要 Redux

Redux 确实有用,但你的需求或许用不到。

1. React 的状态管理

1.1 React 组件的状态管理

1.2 为什么需要全局状态管理

哪些场景需要全局状态管理?

2. 为何慎重 Redux

2.1 项目中 Redux 是怎么工作的

2.2 Redux 的问题

  • 大大增加项目复杂度

3. Redux 的代替方案

3.1

3.2

4. SWR

4.1 什么是 SWR

4.2 SWR 解决了什么问题

4.3 SWR 是如何工作的

4.4 SWR 使用

参考

SWR 中文官网

SWR:最具潜力的 React Hooks 数据请求库

深入浅出 useSWR 原理

Stay Tuned

Want to become a Next.js pro?
The best articles, links and news related to web development delivered once a week to your inbox.