Skip to content

Instantly share code, notes, and snippets.

@Ishan-pro
Created July 27, 2022 14:33
Show Gist options
  • Save Ishan-pro/f584ef5f0b7726b6b8f3eda7e085051f to your computer and use it in GitHub Desktop.
Save Ishan-pro/f584ef5f0b7726b6b8f3eda7e085051f to your computer and use it in GitHub Desktop.
Dev.to Blog Post React Tutorial For beginners - Part 2 -> Getting reactive challenge
import "./styles.css";
import React, {useState} from 'react'
export default function App() {
const [name, setName] = useState(' ')
const handleChange = (e) => {
setName(e.target.value)
}
return (
<div className="App">
<h1>
{
`Hello ${name}`
}
</h1>
<input value={name} onChange={handleChange}/>
</div>
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment