Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
JOU-amjs committed Jun 24, 2024
2 parents fc375dc + 03a031a commit d571cfe
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion docs/tutorial/02-getting-started/01-introduce.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,13 @@ It can simplify API consumption from 7 steps to 1 step. You only need to choose

## How to do it?

### Core functions

alova provides basic request capabilities similar to axios. You can use it with any request library such as axios and fetch to get out-of-the-box features such as response caching and request sharing.

### Request strategy

In actual projects, front-end requests always need to consider when to make requests, when not to make requests, how to process response data, etc. according to different scenarios to meet the performance and performance improvement of the project. This will lead to an increase in the developer's time cost and code maintenance cost. In alova, a complete set of solutions for complex request scenarios is provided, which we call **request strategy**. Only one line of code can quickly implement various complex request logics, which can not only help you improve development efficiency, but also help you improve the running efficiency of the App and reduce the pressure on the server.
Based on the core functions of alova, it also provides a complete solution for complex request scenarios, which we call **request strategy**. With only one line of code, you can quickly implement various complex request logics, which can not only help you improve development efficiency, but also help you improve the running efficiency of the App and reduce the pressure on the server.

For example, `useRequest` can automatically manage the request status, **`loading/error/data` is responsive data**, which can be directly bound in the view in UI frameworks such as react, vue, and svelte, and these responsive data will be automatically maintained according to the request status.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,13 @@ alova 是一个创新的下一代请求工具,从前后端协作和 API 消费

## 如何做的?

### 核心功能

alova 提供了基础的,与 axios 相似的基础请求能力,你可以配合 axios、fetch 等任何请求库使用,获得响应缓存、请求共享等开箱即用的特性。

### 请求策略

在实际项目中,前端请求总是需要根据不同场景考虑应该什么时候发出请求、什么时候不能发出请求、如何处理响应数据等才能满足项目的表现、性能的提高,这将导致开发人员时间成本和代码维护成本的增加,在 alova 中提供了一套完整的应对复杂请求场景的方案,我们称之为**请求策略**,只需一行代码就能快速实现各种复杂的请求逻辑,不仅能帮你提升开发效率,还能帮你提升 App 的运行效率,降低服务端压力。
基于 alova 的核心功能,还提供了完整的应对复杂请求场景的方案,我们称之为**请求策略**,只需一行代码就能快速实现各种复杂的请求逻辑,不仅能帮你提升开发效率,还能帮你提升 App 的运行效率,降低服务端压力。

例如,`useRequest`可以自动管理请求状态,**`loading/error/data` 是响应式的数据**,在 react、vue、svelte 等 UI 框架中可以直接在视图中绑定它们,而且会根据请求状态自动维护它这些响应式数据。

Expand Down

0 comments on commit d571cfe

Please sign in to comment.