Skip to content

Commit

Permalink
docs(*): fix typos (#910)
Browse files Browse the repository at this point in the history
# Overview
fix typos

I hope it helps.
<!--
    A clear and concise description of what this pr is about.
 -->

## PR Checklist

- [x] I did below actions if need

1. I read the [Contributing
Guide](https://github.com/suspensive/react/blob/main/CONTRIBUTING.md)
2. I added documents and tests.

---------

Co-authored-by: Jonghyeon Ko <jonghyeon@toss.im>
  • Loading branch information
apeltop and manudeli authored Jun 13, 2024
1 parent 5390a88 commit c38645e
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const getPost = (postId: number) => fetch(`/post/${postId}`).then<Post>((res) =>
const Example = () => (
<Suspense fallback="awaiting...">
<Await options={{ key: ['post', 2] as const, fn: ({ key: [, postId] }) => getPost(postId) }}>
{(awaited) => <>{awiated.data}</>} // Post
{(awaited) => <>{awaited.data}</>} // Post
</Await>
</Suspense>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const getPost = (postId: number) => fetch(`/post/${postId}`).then<Post>((res) =>
const Example = () => (
<Suspense fallback="awaiting...">
<Await options={{ key: ['post', 2] as const, fn: ({ key: [, postId] }) => getPost(postId) }}>
{(awaited) => <>{awiated.data}</>} // Post
{(awaited) => <>{awaited.data}</>} // Post
</Await>
</Suspense>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

We provide these components to clearly express what causes suspense at the same depth.

1. Prop-driling resulting from removing depth such as AuthorInfo and PostList for data-fetching only is also removed.
1. Prop-drilling resulting from removing depth such as AuthorInfo and PostList for data-fetching only is also removed.
2. Changing the range of Suspense and ErrorBoundary becomes simple. Parallel processing of queries is also easier.
3. Because it manages all data-fetching within the Page component, the internal components are presentational, so it is easy to separate the components.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

같은 depth에서 Suspense를 발생시키는 것이 무엇인지 명확하게 표현하기 위해 이 컴포넌트들을 제공합니다.

1. data-fetching만을 위한 AuthorInfo, PostList와 같은 depth를 제거하기 때문에 생긴 prop-driling도 제거됩니다.
1. data-fetching만을 위한 AuthorInfo, PostList와 같은 depth를 제거하기 때문에 생긴 prop-drilling도 제거됩니다.
2. Suspense, ErrorBoundary의 범위 변경도 간단해집니다. query의 병렬처리도 더 쉽습니다.
3. Page 컴포넌트 내에서 data-fetching을 모두 관장하기 때문에 내부의 컴포넌트는 presentational하므로 컴포넌트를 분리하기 쉽습니다.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ const PostList = ({ userId }) => {

Therefore, we provide these components to clearly express what causes suspension at the same depth.

1. Prop-driling resulting from removing depth such as AuthorInfo and PostList for data-fetching only is also removed.
1. Prop-drilling resulting from removing depth such as AuthorInfo and PostList for data-fetching only is also removed.
2. Changing the range of Suspense and ErrorBoundary becomes simple. Parallel processing of queries is also easier.
3. Because it manages all data-fetching within the Page component, the internal components are presentational, so it is easy to separate the components.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ const PostList = ({ userId }) => {

따라서 같은 depth에서 Suspense를 발생시키는 것이 무엇인지 명확하게 표현하기 위해 이 컴포넌트들을 제공합니다.

1. data-fetching만을 위한 AuthorInfo, PostList와 같은 depth를 제거하기 때문에 생긴 prop-driling도 제거됩니다.
1. data-fetching만을 위한 AuthorInfo, PostList와 같은 depth를 제거하기 때문에 생긴 prop-drilling도 제거됩니다.
2. Suspense, ErrorBoundary의 범위 변경도 간단해집니다. query의 병렬처리도 더 쉽습니다.
3. Page 컴포넌트 내에서 data-fetching을 모두 관장하기 때문에 내부의 컴포넌트는 presentational하므로 컴포넌트를 분리하기 쉽습니다.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ These all hocs can be replaced beautifully by new hoc builder [`wrap`](/docs/rea
```diff
import { ErrorBoundaryGroup } from '@suspensive/react'

const Exmample = () => {
const Example = () => {
return (
<ErrorBoundaryGroup>
- <ErrorBoundaryGroup.Reset trigger={(group) => <button onClick={group.reset}>reset all</button>} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ v2에서는 `<AsyncBoundary/>`를 제거했습니다[#295](https://github.com/to
```diff
import { ErrorBoundaryGroup } from '@suspensive/react'

const Exmample = () => {
const Example = () => {
return (
<ErrorBoundaryGroup>
- <ErrorBoundaryGroup.Reset trigger={(group) => <button onClick={group.reset}>reset all</button>} />
Expand Down
4 changes: 2 additions & 2 deletions docs/suspensive.org/src/pages/docs/react/wrap.en.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const Page = wrap
() => {
const { data: postList } = useSuspenseQuery({
queryKey: ['posts'],
queryFn: () => fetch(`https://exmaple.com/posts`).then((res) => res.json()),
queryFn: () => fetch(`https://example.com/posts`).then((res) => res.json()),
})

return (
Expand All @@ -38,7 +38,7 @@ const PostItem =
((props) => {
const { data: post } = useSuspenseQuery({
queryKey: ['posts', props.id],
queryFn: () => fetch(`https://exmaple.com/posts/${props.id}`).then((res) => res.json()),
queryFn: () => fetch(`https://example.com/posts/${props.id}`).then((res) => res.json()),
})

return <>{post.title}</>
Expand Down
4 changes: 2 additions & 2 deletions docs/suspensive.org/src/pages/docs/react/wrap.ko.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const Page = wrap
() => {
const { data: postList } = useSuspenseQuery({
queryKey: ['posts'],
queryFn: () => fetch(`https://exmaple.com/posts`).then((res) => res.json()),
queryFn: () => fetch(`https://example.com/posts`).then((res) => res.json()),
})

return (
Expand All @@ -38,7 +38,7 @@ const PostItem =
((props) => {
const { data: post } = useSuspenseQuery({
queryKey: ['posts', props.id],
queryFn: () => fetch(`https://exmaple.com/posts/${props.id}`).then((res) => res.json()),
queryFn: () => fetch(`https://example.com/posts/${props.id}`).then((res) => res.json()),
})

return <>{post.title}</>
Expand Down

0 comments on commit c38645e

Please sign in to comment.