Updates new features

Adds string returns
This commit is contained in:
Spyridon D. Papaioannou 2017-10-22 00:23:01 +01:00 committed by GitHub
parent b1a2733ed1
commit f5ac4d8bfb
1 changed files with 13 additions and 0 deletions

View File

@ -406,6 +406,19 @@ You can return multiple nodes as arrays.
See: [Fragments and strings](https://reactjs.org/blog/2017/09/26/react-v16.0.html#new-render-return-types-fragments-and-strings)
### Returning strings
```js
render() {
return 'Look ma, no spans!';
}
```
{: data-line="2"}
You can return just a string.
See: [Fragments and strings](https://reactjs.org/blog/2017/09/26/react-v16.0.html#new-render-return-types-fragments-and-strings)
### Errors
```js