Guest User

Untitled

a guest
Feb 22nd, 2018
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. import React, { Fragment } from 'react';
  2. import Input from './Input';
  3.  
  4. const App = () => (
  5. <div>
  6. <h1> Enter your name below</h1>
  7. <Input
  8. render={({ name, handleSubmit, handleChange }) => (
  9. <Fragment>
  10. Current Name: {name}
  11. <form onSubmit={handleSubmit}>
  12. <label>
  13. Name:
  14. <input type="text" value={name} onChange={handleChange} />
  15. </label>
  16. <input type="submit" value="Submit" />
  17. </form>
  18. </Fragment>
  19. )}
  20. />
  21. </div>
  22. );
  23.  
  24. export default App;
Add Comment
Please, Sign In to add comment