Accepted answer


This will work React 16 and latest TypeScript definitions. The below answer is preserved for people on React 15 and below 🌹

Old Answer

render() return a single JSX element not an array

This is TypeScript actually helping you. you must return a single element from the render.


Consider wrapping the output in a div. This might break your css so you need to think about reorganizing that as well.

Alternatively don't create a component and just {callFoo()} in JSX instead of <Foo/>.

Related Query

More Query from same tag