Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import React, { useState } from 'react'
- import Child from './Child'
- const App = () => {
- const [value, setValue] = useState('')
- return (
- <div>
- React app
- <input
- type="text"
- name="name"
- id="name"
- onChange={e => setValue(e.target.value)}
- placeholder="Bir seyler yazin"
- />
- <br />
- Input value:
- { value }
- {
- value.length < 4 ? <Child /> : null
- }
- </div>
- )
- }
- export default App
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement