JSX - append element

0 votes
116 views
added Jul 4, 2019 in JSX by LC Marshal Captain (25,770 points)
const sentenceElement = [
  <p key="1">hi</p>,
  <p key="2">lad</p>,
]
sentenceElement.push(<p key="3">you are awesome</p>)

 

lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
...