Skip to content

Instantly share code, notes, and snippets.

@misss-popcorn
Last active October 25, 2020 15:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save misss-popcorn/7f1a29bdb424fb5add792f0174f68b4c to your computer and use it in GitHub Desktop.
Save misss-popcorn/7f1a29bdb424fb5add792f0174f68b4c to your computer and use it in GitHub Desktop.
import React, {useState} from "react";
import "../../App.css";
export default function Function() {
const [name, setName] = useState("");
const handleChange = (e) => {
setName(e.target.value);
};
return (
<span className="Right">
<p>Function Component</p>
<input value={name} onChange={handleChange}></input>
</span>
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment