react fun tion

Solutions on MaxInterview for react fun tion by the best coders in the world

showing results for - "react fun tion"
Salma
26 Feb 2018
1import React from 'react'; const App = () => {  const greeting = 'Hello Function Component!';   return <Headline value={greeting} />;}; const Headline = ({ value }) =>  <h1>{value}</h1>; export default App;
Ashby
28 Sep 2018
1// it a component
2import React from 'react';
3
4class App extends React.Component {
5      //call function (ECMAScript 5) from tag input:text
6  handleChange = e => {
7    //
8    console.log(`${e.target.value}`)
9  }
10  render() { 
11    return (
12      <div className="App">
13        <input type="text" name="input" id="" placeholder="" onChange={this.handleChange}/>
14      </div>
15    );
16}
17}
18
19export default App;