Answers for "React Syntax"

0

React Syntax

import React,{ Component } from 'react';

class App extends Component {

render() {
	return (	
	<div>
		<h1>Hello, World.Welcome to W3UNIVERSITY.</h1>
	</div>

	);
}
}
	
export default App;
Posted by: Guest on October-09-2021
1

javascript in jsx

const name = 'Josh Perez';
const element = <h1>Hello, {name}</h1>;
//notice the use of {...} to jump from jsx to javascript.
ReactDOM.render(
  element,
  document.getElementById('root')
);
Posted by: Guest on May-01-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language