function component react js
function app() {
return (
<div>
<h1>Hello World</h1>;
</div>
);
}
function component react js
function app() {
return (
<div>
<h1>Hello World</h1>;
</div>
);
}
react functional components
const component = () => {
console.log("This is a functional Component");
}
functional component react
function Welcome(props) {
return <h1>Hello, {props.name}</h1>;
}
function App() {
return (
<div>
<Welcome name="Sara" /> <Welcome name="Cahal" /> <Welcome name="Edite" /> </div>
);
}
ReactDOM.render(
<App />,
document.getElementById('root')
);
functional components react
function Comment(props) {
return (
<div className="Comment">
<div className="UserInfo">
<img className="Avatar"
src={props.author.avatarUrl}
alt={props.author.name}
/>
<div className="UserInfo-name">
{props.author.name}
</div>
</div>
<div className="Comment-text">
{props.text}
</div>
<div className="Comment-date">
{formatDate(props.date)}
</div>
</div>
);
}
react component example
const element = <div />;
react functional component example
function Greeting(props) {
return <h1> Hello, {props.name}! </h1>
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us