diff --git a/src/guide/comparison.md b/src/guide/comparison.md index bcb6699b0c..479d454093 100644 --- a/src/guide/comparison.md +++ b/src/guide/comparison.md @@ -106,25 +106,24 @@ In React, everything is Just JavaScript, which sounds very simple and elegant - In React, all components express their UI within render functions using JSX, a declarative XML-like syntax that works within Javascript. Here's an example, [vetted by the React community](https://github.com/vuejs/vuejs.org/issues/364#issuecomment-244582684): ``` jsx -render () { - let { items } = this.props - - let children - if (items.length > 0) { - children = ( -
No items found.
+renderItems() { + if (!this.props.items) { + returnNo items found.
; } + return ( +