Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/content/learn/conditional-rendering.md
Original file line number Diff line number Diff line change
Expand Up @@ -721,11 +721,13 @@ Another solution would be to remove the condition altogether by moving the infor
```js
const drinks = {
tea: {
name: 'tea',
part: 'leaf',
caffeine: '15–70 mg/cup',
age: '4,000+ years'
},
coffee: {
name: 'coffee',
part: 'bean',
caffeine: '80–185 mg/cup',
age: '1,000+ years'
Expand All @@ -736,7 +738,7 @@ function Drink({ name }) {
const info = drinks[name];
return (
<section>
<h1>{name}</h1>
<h1>{info.name}</h1>
<dl>
<dt>Part of plant</dt>
<dd>{info.part}</dd>
Expand Down