diff --git a/src/guide/comparison.md b/src/guide/comparison.md index 13d75eb26c..d52ad08ec1 100644 --- a/src/guide/comparison.md +++ b/src/guide/comparison.md @@ -55,17 +55,21 @@ With React's JSX, there are minor differences from HTML, such as using `classNam Take this example below: ``` jsx -render () { - const { items } = this.props - +render() { + let { items } = this.props + + let children + if (items.length > 0) { + children = items.map(item => +
  • {item.name}
  • + ) + } else { + children =

    No items found.

    + } + return (
    - {items.length - ? - :

    No items found.

    - } + {children}
    ) }