Skip to content

Commit

Permalink
docs(fixed typos in overview and state files.): fixed typos in Overvi…
Browse files Browse the repository at this point in the history
…ew and State files (#4524)

Co-authored-by: Elias Emanuel Copa <eecopa@Work-MacBook-Air.local>
  • Loading branch information
eecopa and Elias Emanuel Copa committed Jun 19, 2023
1 parent e598f81 commit c395e89
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ You can think of inline components as being inlined into the component where the
Inline components come with some limitations that the standard `component$()`
does not have. Inline components:
- Cannot use `use*` methods such as `useSignal` or `useStore`.
- Cannot project content with a `<Slot>`
- Cannot project content with a `<Slot>`.

As the name implies, inline components are best used sparingly for
lightweight pieces of markup since they offer the convenience of being
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ In Qwik there are two ways to create computed values, each with a different use
2. [`useResource$()`](/docs/(qwik)/components/state/index.mdx): `useResource$()` is used when the computed value is asynchronous or the state comes from outside of the application. For example, fetching the current weather (external state) based on a current location (application internal state).


In addition to the two ways of creating computed values described above, there is also a lower-level ([`useTask$()`](/docs/(qwik)/components/tasks/index.mdx#usetask). This way does not produce a new signal, but rather modifies the existing state or produces a side effect.
In addition to the two ways of creating computed values described above, there is also a lower-level ([`useTask$()`](/docs/(qwik)/components/tasks/index.mdx#usetask)). This way does not produce a new signal, but rather modifies the existing state or produces a side effect.

### `useComputed$()`

Expand Down Expand Up @@ -262,10 +262,10 @@ export default component$(() => {



> **Note:** The important thing to understand about `useResource$` is that it executes on the initial component render (just like `useTask$`.) Often time it is desirable to start fetching the data on the server as part of the initial HTTP request before the component is rendered. Fetching data as part of SSR is a more common and preferred way of loading data and is done through [`routeLoader$`](/docs/(qwikcity)/route-loader/index.mdx) API instead. `useResource$` is more of a low-level API that is useful when you want to fetch data on in the browser.
> **Note:** The important thing to understand about `useResource$` is that it executes on the initial component render (just like `useTask$`). Often time it is desirable to start fetching the data on the server as part of the initial HTTP request before the component is rendered. Fetching data as part of SSR is a more common and preferred way of loading data and is done through [`routeLoader$`](/docs/(qwikcity)/route-loader/index.mdx) API instead. `useResource$` is more of a low-level API that is useful when you want to fetch data in the browser.
>
>
> In many ways `useResource$` is similar to `useTask$` The big differences are:
> In many ways `useResource$` is similar to `useTask$`. The big differences are:
>
> - `useResource$` allows you to return a "value".
> - `useResource$` does not block rendering while the resource is being resolved.
Expand Down

0 comments on commit c395e89

Please sign in to comment.