passing props as function code example
Example 1: class component params in react
<input
type= "text"
value={ this.state.value || "" }
placeholder="Enter Name"
/>
Example 2: react native function
class Foo extends Component {
handleClick() {
console.log('Click happened');
}
render() {
return <button onClick={this.handleClick.bind(this)}>Click Me</button>;
}
}