Correct usage of formatName() function in docs (#8122)
The code section above these changes defines a `formatName` function that expects a parameter `user`. The code section containing these changes incorrectly called `formatName(user.name)`. For those following along with CodePen, this section should correctly call `formatName(user)`.
Lewis Blackwood committed
Oct 27, 2016 at 13:01 UTC
dba8f258549c936657d86e599310e92e6afd7f66
1 file changed
+1
-1
docs/docs/introducing-jsx.md
+1
-1
@@ -59,7 +59,7 @@ This means that you can use JSX inside of `if` statements and `for` loops, assig
59
```js{3,5}
60
function getGreeting(user) {
61
if (user) {
62
- return <h1>Hello, {formatName(user.name)}!</h1>;
62
+ return <h1>Hello, {formatName(user)}!</h1>;
63
} else {
64
return <h1>Hello, Stranger.</h1>;
65
}