ReactJS Real time Interview Questions

Rewrite this without using JSX:
<div className='ui items'>
Hello, friend! I am a basic React component.
</div>
Ans: 
React.createElement('div', {className: 'ui items'},
React.createElement('p', null, 'Hello, friend! I am a basic React component.')
)

Comments

Contact Form

Send