Skip to content

Commit 5995e3d

Browse files
Ian Wilsonhramos
authored andcommitted
docs(text): fixed code snippet to return in render func (facebook#397)
* docs(text): fixed code snippet to return in render func * Update text.md * Update text.md
1 parent e4573e8 commit 5995e3d

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

docs/text.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,9 +179,11 @@ Assuming that `MyAppText` is a component that simply renders out its children in
179179
```javascript
180180
class MyAppHeaderText extends Component {
181181
render() {
182-
<MyAppText>
183-
<Text style={{fontSize: 20}}>{this.props.children}</Text>
184-
</MyAppText>;
182+
return (
183+
<MyAppText>
184+
<Text style={{fontSize: 20}}>{this.props.children}</Text>
185+
</MyAppText>
186+
);
185187
}
186188
}
187189
```

0 commit comments

Comments
 (0)