Skip to content

Commit

Permalink
fixed typo in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
rohitbhoite committed Apr 9, 2024
1 parent 70964ec commit 1dc2374
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions website/docs/essentials/auto_dispose.mdx
Expand Up @@ -104,13 +104,13 @@ makes it easier to spot when we forget to dispose of something.

Sometimes, you may want to force the destruction of a provider.
This can be done by using `ref.invalidate`, which can be called from another
provider or from a widget.
provider or a widget.

Using `ref.invalidate` will destroy the current provider state.
There are then two possible outcomes:

- If the provider is listened, a new state will be created.
- If the provider is not listened, the provider will be fully destroyed.
- If the provider is listened to, a new state will be created.
- If the provider is not listened to, the provider will be fully destroyed.

<AutoSnippet raw={invalidateExample} />

Expand Down
6 changes: 3 additions & 3 deletions website/docs/essentials/combining_requests.mdx
Expand Up @@ -12,7 +12,7 @@ import watchPlacement from "./combining_requests/watch_placement";
import listenExample from "./combining_requests/listen_example";
import readExample from './combining_requests/read_example'

Up till now, we've only seen cases where requests are independent from each
Up until now, we've only seen cases where requests are independent of each
other. But a common use-case is to have to trigger a request based on the
result of another request.

Expand All @@ -24,14 +24,14 @@ But this approach has a few downsides:
- This leaks implementation details.
Now, your UI needs to know about all the providers that are used
by your other provider.
- Whenever the parameter changes, a brand new state will be made.
- Whenever the parameter changes, a brand new state will be created.
By passing parameters, there is no way to keep the previous state
when the parameter changes.
- It makes combining requests harder.
- This makes tooling less useful. A devtool wouldn't
know about the relationship between providers.

To improve this, Riverpod offers a different approach to combine requests.
To improve this, Riverpod offers a different approach to combining requests.

## The basics: Obtaining a "ref"

Expand Down
2 changes: 1 addition & 1 deletion website/docs/essentials/faq.mdx
Expand Up @@ -8,7 +8,7 @@ import { AutoSnippet, When } from "/src/components/CodeSnippet";

Here are some commonly asked questions from the community:

## What is the different between `ref.refresh` and `ref.invalidate`?
## What is the difference between `ref.refresh` and `ref.invalidate`?

You may have noticed that `ref` has two methods to force a provider to recompute,
and wonder how they differ.
Expand Down
2 changes: 1 addition & 1 deletion website/docs/essentials/provider_observer.mdx
Expand Up @@ -9,7 +9,7 @@ import providerObserver from "!!raw-loader!./provider_observer/provider_observer

Riverpod natively offers a way to listen to all events happening
in the provider tree.
This can be used to log all the events, or to report errors to a
This can be used to log all the events or to report errors to a
remote service.

This is achieved by using the `ProviderObserver` class,
Expand Down
Expand Up @@ -182,7 +182,7 @@ makes it easier to spot when we forget to dispose of something.
<!---
Sometimes, you may want to force the destruction of a provider.
This can be done by using `ref.invalidate`, which can be called from another
provider or from a widget.
provider or a widget.
-->
有时,您可能希望强制处置提供者程序。
这可以通过使用 `ref.invalidate` 来完成,
Expand Down
Expand Up @@ -13,7 +13,7 @@ import listenExample from "/docs/essentials/combining_requests/listen_example";
import readExample from '/docs/essentials/combining_requests/read_example'

<!---
Up till now, we've only seens cases were requests are independent from each
Up until now, we've only seen cases were requests are independent from each
other. But a common use-case is to have to trigger a request based on the
result of another request.
-->
Expand Down Expand Up @@ -51,7 +51,7 @@ But this approach has a few downsides:
- 这使得开发工具的用处降低。devtool 不会知道提供者程序之间的关系。

<!---
To improve this, Riverpod offers a different approach to combine requests.
To improve this, Riverpod offers a different approach to combining requests.
-->
为了改善这一点,Riverpod 提供了一种不同的方法来合并请求。

Expand Down
Expand Up @@ -11,7 +11,7 @@ Here are some commonly asked questions from the community:
以下是社区中的一些常见问题:

<!---
## What is the different between `ref.refresh` and `ref.invalidate`?
## What is the difference between `ref.refresh` and `ref.invalidate`?
-->
## `ref.refresh` `ref.invalidate` 之间有什么不同?

Expand Down

0 comments on commit 1dc2374

Please sign in to comment.