Here is how to include javascript statements in JSX
import React from 'react';
const person = () => {
return <p>I have {Math.floor(Math.random()*30)} years of experience.</p>
}
export default person;
This example shows a React component using function.
Comments
Post a Comment