Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save DakotaLMartinez/6aee6b480e712de4486731f08cff0aa9 to your computer and use it in GitHub Desktop.
Save DakotaLMartinez/6aee6b480e712de4486731f08cff0aa9 to your computer and use it in GitHub Desktop.
Setters
const [imgUrl, imgUrlSetter] = useState("https://upload.wikimedia.org/wikipedia/commons/thumb/e/ec/Mona_Lisa%2C_by_Leonardo_da_Vinci%2C_from_C2RMF_retouched.jpg/300px-Mona_Lisa%2C_by_Leonardo_da_Vinci%2C_from_C2RMF_retouched.jpg");
const [title, titleSetter] = useState("Mona Lisa");
const [artistName, artistNameSetter] = useState("Leonardo Da Vinci");
const [date, dateSetter] = useState("c. 1503–1506, perhaps continuing until c. 1517");
const [width, widthSetter] = useState("21");
const [height, heightSetter] = useState("30");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment