functions as props react code example
Example 1: function component with props
import React from "react"
function Checkbox(props){
return (
)
}
export default Checkbox
Example 2: react native function
class Foo extends Component {
handleClick() {
console.log('Click happened');
}
render() {
return ;
}
}