2

I followed the instructions in https://github.com/vuejs/jsx to add JSX support in my Vue app. It does in fact work - it renders JSX, but for some reason does not render nested elements.

public render(h: CreateElement): VNode {
    // This works as expected: it renders a div with "Hello"
    return (
        <div>
            Hello
        </div>
    )
}

public render(h: CreateElement): VNode {
    // This does *not* work as expected, it renders an empty div
    return (
        <div>
            <span>Hello</span>
        </div>
    )
}

What am I doing wrong?

Liran H
  • 9,143
  • 7
  • 39
  • 52

0 Answers0