Advertisement
Guest User

Untitled

a guest
Aug 20th, 2019
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. import React, { useState } from 'react'
  2. import Child from './Child'
  3.  
  4. const App = () => {
  5. const [value, setValue] = useState('')
  6.  
  7. return (
  8. <div>
  9. React app
  10. <input
  11. type="text"
  12. name="name"
  13. id="name"
  14. onChange={e => setValue(e.target.value)}
  15. placeholder="Bir seyler yazin"
  16. />
  17. <br />
  18. Input value:
  19. { value }
  20. {
  21. value.length < 4 ? <Child /> : null
  22. }
  23. </div>
  24. )
  25. }
  26.  
  27. export default App
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement