a function syntax react code example
Example 1: react functional components
const component = () => {
console.log("This is a functional Component");
}
Example 2: react native function
class Foo extends Component {
handleClick() {
console.log('Click happened');
}
render() {
return ;
}
}