dan
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with
13 additions and
6 deletions
-
beta/src/components/MDX/MDXComponents.tsx
-
beta/src/pages/learn/adding-interactivity.md
-
beta/src/pages/learn/describing-the-ui.md
-
beta/src/pages/learn/installation.md
-
beta/src/pages/learn/managing-state.md
|
|
@ -135,8 +135,15 @@ function MathI({children}: {children: any}) { |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|
function YouWillLearn({children}: {children: any}) { |
|
|
|
return <SimpleCallout title="You will learn">{children}</SimpleCallout>; |
|
|
|
function YouWillLearn({ |
|
|
|
children, |
|
|
|
isChapter, |
|
|
|
}: { |
|
|
|
children: any; |
|
|
|
isChapter?: boolean; |
|
|
|
}) { |
|
|
|
let title = isChapter ? 'In this chapter' : 'You will learn'; |
|
|
|
return <SimpleCallout title={title}>{children}</SimpleCallout>; |
|
|
|
} |
|
|
|
|
|
|
|
// TODO: typing.
|
|
|
|
|
|
@ -8,7 +8,7 @@ Some things on the screen update in response to user input. For example, clickin |
|
|
|
|
|
|
|
</Intro> |
|
|
|
|
|
|
|
<YouWillLearn> |
|
|
|
<YouWillLearn isChapter={true}> |
|
|
|
|
|
|
|
* [How to handle user-initiated events](/learn/responding-to-events) |
|
|
|
* [How to make components "remember" information with state](/learn/state-a-components-memory) |
|
|
|
|
|
@ -8,7 +8,7 @@ React is a JavaScript library for rendering user interfaces (UI). UI is built fr |
|
|
|
|
|
|
|
</Intro> |
|
|
|
|
|
|
|
<YouWillLearn> |
|
|
|
<YouWillLearn isChapter={true}> |
|
|
|
|
|
|
|
* [How to write your first React component](/learn/your-first-component) |
|
|
|
* [When and how to create multi-component files](/learn/importing-and-exporting-components) |
|
|
|
|
|
@ -8,7 +8,7 @@ React has been designed from the start for gradual adoption, and you can use as |
|
|
|
|
|
|
|
</Intro> |
|
|
|
|
|
|
|
<YouWillLearn> |
|
|
|
<YouWillLearn isChapter={true}> |
|
|
|
|
|
|
|
* [How to add React to an HTML page](/learn/add-react-to-a-website) |
|
|
|
* [How to start a standalone React project](/learn/start-a-new-react-project) |
|
|
|
|
|
@ -8,7 +8,7 @@ As your application grows, it helps to be more intentional about how your state |
|
|
|
|
|
|
|
</Intro> |
|
|
|
|
|
|
|
<YouWillLearn> |
|
|
|
<YouWillLearn isChapter={true}> |
|
|
|
|
|
|
|
* [How to think about UI changes as state changes](/learn/reacting-to-input-with-state) |
|
|
|
* [How to structure state well](/learn/choosing-the-state-structure) |
|
|
|