Skip to content

Commit

Permalink
docs: edit doc
Browse files Browse the repository at this point in the history
  • Loading branch information
yaob421123 committed Apr 25, 2023
1 parent 5bae448 commit 0aca025
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 30 deletions.
1 change: 0 additions & 1 deletion core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ $ npm install @kkt/pro -D # yarn add @kkt/pro -D
- [X] 入口文件自动生成
- [X] 默认全局样式文件
- [X] 配置文件路由自动生成/通过配置自动通过文件路径生成路由
- [X] 菜单`icon`图标处理
- [X] 支持`react-router 6`
- [X] 支持`react-redux`
- [X] 默认封装`mocker`代理配置
Expand Down
28 changes: 0 additions & 28 deletions packages/request/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -469,34 +469,6 @@ const client = queryClient;
```
### 提交过程不引起 URL 跳转
使用 `useFetcher` 钩子定义一个 `fetcher.Form` 标签
```jsx
import { useLoaderData, Form, useFetcher } from "@kkt/pro";

FavoritePage.action = async ({ params, request }) => {
let formData = await request.formData();
return updateContact(params.contactId, {
favorite: formData.get("favorite") === "true",
});
}

export default function FavoritePage({ contact }) {
const fetcher = useFetcher();
let favorite = contact.favorite;
return (
<fetcher.Form method="post">
<button name="favorite" value={favorite ? "false" : "true"}>
{favorite ? "" : ""}
</button>
</fetcher.Form>
);
}
```
## 比较 | React Query vs SWR vs Apollo vs RTK Query vs React Router
| | React Query | SWR [_(Website)_][swr] | Apollo Client [_(Website)_][apollo] | RTK-Query [_(Website)_][rtk-query] | React Router [_(Website)_][react-router] |
Expand Down
1 change: 0 additions & 1 deletion website/src/pages/kktp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ $ npm install @kkt/pro -D # yarn add @kkt/pro -D
- 入口文件自动生成
- 默认全局样式文件
- 配置文件路由自动生成/通过配置自动通过文件路径生成路由
- 菜单`icon`图标处理
- 支持`react-router 6`
- 支持`react-redux`
- 默认封装`mocker`代理配置
Expand Down

0 comments on commit 0aca025

Please sign in to comment.