データが入っている配列
javascript
1const data = [ 2{type: 'Heading', text:'hogehoge'}, 3{type: 'Text', text:'hogehoge'}, 4{type: 'Image', url:'url'}, 5{type: 'Div', child:[{type: 'Heading', text:'hogehoge'},{type: 'Text', text:'hogehoge'}]} 6]
この配列をベースに動的に下記のようなコンポーネントを生成したいのですが、どのようにすれば効率よく綺麗にコンポーネントを作れるでしょうか。
HTML
1<h1>hogehoge</h1> 2<p>hogehoge</p> 3<img src="url"/> 4<div> 5<h1>hogehoge</h1> 6<p>hogehoge</p> 7</div>

バッドをするには、ログインかつ
こちらの条件を満たす必要があります。