Black Lives Matter. Please consider donating to Black Girls Code today.

How to generate components from the list of iterables? e.g. [html.P(i) for i in [1,2,3]] [Solved]

The standard Data-Driven-Document question… How would you generate a set of components from the list of iterables?

I’m trying:

[html.P(i) for i in [1,2,3]]

but get an error:

bundle.js:9 Uncaught (in promise) Error: component.type is undefined
    at s (bundle.js:9)
    at Array.map (<anonymous>)
    at s (bundle.js:9)
    at Array.map (<anonymous>)
    at s (bundle.js:9)
    at Array.map (<anonymous>)
    at s (bundle.js:9)
    at e.value (bundle.js:9)
    at p._renderValidatedComponentWithoutOwnerOrContext (react-dom.min.js:13)
    at p._renderValidatedComponent (react-dom.min.js:13)

ok, solved it - wrap it into html.Div()

html.Div([html.P(i) for i in [1,2,3]])