react create function in functional component code example
Example 1: create functional component react
import React from 'react'; const App = () => { const greeting = 'Hello Function Component!'; return ;}; const Headline = ({ value }) => {value}
; export default App;
Example 2: react function component
function Welcome(props) {
return Hello, {props.name}
;
}
Example 3: react functional component example
function Greeting(props) {
return Hello, {props.name}!
}