Skip to content

Commit

Permalink
fix typos in tutorial
Browse files Browse the repository at this point in the history
Summary:
Addressing feedback about an incorrect word in the fragments tutorial.

Selected text: "Update the Props to accept a PosterBylineFragment$key as the person prop."

Feedback: "There is a typo here in the form of an entire word:
person should be poster here.

Reviewed By: evanyeung

Differential Revision: D54830901

fbshipit-source-id: 85fab0656156587adfd9e5b821fbe9bc3f2ca7b7
  • Loading branch information
monicatang authored and facebook-github-bot committed Mar 13, 2024
1 parent 18dec8a commit dc36b48
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions website/docs/tutorial/fragments-1.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ type Props = {
export default function Story({story}: Props) {
return (
<Card>
<PosterByline person={story.poster} />
<PosterByline poster={story.poster} />
<Heading>{story.title}</Heading>
// change-line
<Timestamp time={story.createdAt} /> // Add this line
Expand Down Expand Up @@ -142,7 +142,7 @@ export default function Story({story}: Props) {
return (
<Card>
<Heading>{data.title}</Heading>
<PosterByline person={data.poster} />
<PosterByline poster={data.poster} />
<Timestamp time={data.createdAt} />
<Image image={data.image} />
<StorySummary summary={data.summary} />
Expand Down Expand Up @@ -210,7 +210,7 @@ The `PosterByline` component used by `Story` renders the poster’s name and pro
* Declare a `PosterBylineFragment` on `Actor` and specify the fields it needs (`name`, `profilePicture`). The `Actor` type represents a person or organization that can post a story.
* Spread that fragment within `poster` in `StoryFragment`.
* Call `useFragment` to retrieve the data.
* Update the Props to accept a `PosterBylineFragment$key` as the `person` prop.
* Update the Props to accept a `PosterBylineFragment$key` as the `poster` prop.

It’s worth going through these steps a second time, to get the mechanics of using fragments under your fingers. There are a lot of parts here that need to slot together in the right way.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ type Props = {
export default function Story({story}: Props) {
return (
<Card>
<PosterByline person={story.poster} />
<PosterByline poster={story.poster} />
<Heading>{story.title}</Heading>
// change-line
<Timestamp time={story.createdAt} /> // Add this line
Expand Down Expand Up @@ -142,7 +142,7 @@ export default function Story({story}: Props) {
return (
<Card>
<Heading>{data.title}</Heading>
<PosterByline person={data.poster} />
<PosterByline poster={data.poster} />
<Timestamp time={data.createdAt} />
<Image image={data.image} />
<StorySummary summary={data.summary} />
Expand Down Expand Up @@ -210,7 +210,7 @@ The `PosterByline` component used by `Story` renders the poster’s name and pro
* Declare a `PosterBylineFragment` on `Actor` and specify the fields it needs (`name`, `profilePicture`). The `Actor` type represents a person or organization that can post a story.
* Spread that fragment within `poster` in `StoryFragment`.
* Call `useFragment` to retrieve the data.
* Update the Props to accept a `PosterBylineFragment$key` as the `person` prop.
* Update the Props to accept a `PosterBylineFragment$key` as the `poster` prop.

It’s worth going through these steps a second time, to get the mechanics of using fragments under your fingers. There are a lot of parts here that need to slot together in the right way.

Expand Down

0 comments on commit dc36b48

Please sign in to comment.