Skip to content

Commit 3e40967

Browse files
committed
stuff
1 parent 2d6052e commit 3e40967

File tree

2 files changed

+23
-7
lines changed

2 files changed

+23
-7
lines changed

beta/src/pages/learn/index.md

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,12 @@ Welcome to the React documentation! This page will give you an introduction to t
1010

1111
<YouWillLearn>
1212

13-
TODO
13+
- How to define components
14+
- How to add markup and styles
15+
- How to display data
16+
- How to render conditions and lists
17+
- How to respond to events and update the screen
18+
- How to share data between components
1419

1520
</YouWillLearn>
1621

@@ -250,14 +255,19 @@ Notice how `<li>` has a `key` attribute. A key helps React figure out what happe
250255
251256
```js
252257
const products = [
253-
{ title: 'Cabbage', id: 1 },
254-
{ title: 'Garlic', id: 2 },
255-
{ title: 'Apple', id: 3 },
258+
{ title: 'Cabbage', isFruit: false, id: 1 },
259+
{ title: 'Garlic', isFruit: false, id: 2 },
260+
{ title: 'Apple', isFruit: true, id: 3 },
256261
];
257262

258263
export default function ShoppingList() {
259264
const listItems = products.map(product =>
260-
<li key={product.id}>
265+
<li
266+
key={product.id}
267+
style={{
268+
color: product.isFruit ? 'magenta' : 'darkgreen'
269+
}}
270+
>
261271
{product.title}
262272
</li>
263273
);
@@ -470,4 +480,10 @@ button {
470480
}
471481
```
472482
473-
</Sandpack>
483+
</Sandpack>
484+
485+
## Next steps {/*next-steps*/}
486+
487+
By now, you know the basics of how to write React code.
488+
489+
Head to [Thinking in React](/learn/thinking-in-react) to see how it feels to build a UI with React in practice.

beta/src/pages/learn/thinking-in-react.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ td {
195195

196196
</Sandpack>
197197

198-
**Don't fret if this code example looks intimidating!** In this guide, we're focusing on concepts rather than code. Make sure to bookmark [Describing the UI](/learn/describing-the-ui) which will help you fill in the gaps and make sense of this code.
198+
(If this code looks intimidating, go through the [Quick Start](/learn/) first!)
199199

200200
After building your components, you'll have a library of reusable components that render your data model. Because this is a static app, the components will only return JSX. The component at the top of the hierarchy (`FilterableProductTable`) will take your data model as a prop. This is called _one-way data flow_ because the data flows down from the top-level component to the ones at the bottom of the tree.
201201

0 commit comments

Comments
 (0)