diff --git a/website/docs/essentials/auto_dispose.mdx b/website/docs/essentials/auto_dispose.mdx index f7747462e..1f1c1b109 100644 --- a/website/docs/essentials/auto_dispose.mdx +++ b/website/docs/essentials/auto_dispose.mdx @@ -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. diff --git a/website/docs/essentials/combining_requests.mdx b/website/docs/essentials/combining_requests.mdx index 481a17d23..31b4aa3f9 100644 --- a/website/docs/essentials/combining_requests.mdx +++ b/website/docs/essentials/combining_requests.mdx @@ -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. @@ -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" diff --git a/website/docs/essentials/faq.mdx b/website/docs/essentials/faq.mdx index 83fc94cc3..78a36c487 100644 --- a/website/docs/essentials/faq.mdx +++ b/website/docs/essentials/faq.mdx @@ -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. diff --git a/website/docs/essentials/provider_observer.mdx b/website/docs/essentials/provider_observer.mdx index 307cfac9c..52b0253b5 100644 --- a/website/docs/essentials/provider_observer.mdx +++ b/website/docs/essentials/provider_observer.mdx @@ -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, diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/essentials/auto_dispose.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/essentials/auto_dispose.mdx index 7a0d8173c..c04978d76 100644 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/essentials/auto_dispose.mdx +++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/essentials/auto_dispose.mdx @@ -182,7 +182,7 @@ makes it easier to spot when we forget to dispose of something. 有时,您可能希望强制处置提供者程序。 这可以通过使用 `ref.invalidate` 来完成, diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/essentials/combining_requests.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/essentials/combining_requests.mdx index 773884f16..aaa9d4582 100644 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/essentials/combining_requests.mdx +++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/essentials/combining_requests.mdx @@ -13,7 +13,7 @@ import listenExample from "/docs/essentials/combining_requests/listen_example"; import readExample from '/docs/essentials/combining_requests/read_example' @@ -51,7 +51,7 @@ But this approach has a few downsides: - 这使得开发工具的用处降低。devtool 不会知道提供者程序之间的关系。 为了改善这一点,Riverpod 提供了一种不同的方法来合并请求。 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/essentials/faq.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/essentials/faq.mdx index 4c6e25e26..c05acdf11 100644 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/essentials/faq.mdx +++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/essentials/faq.mdx @@ -11,7 +11,7 @@ Here are some commonly asked questions from the community: 以下是社区中的一些常见问题: ## `ref.refresh` 和 `ref.invalidate` 之间有什么不同?