This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { useState } from 'react'; | |
| import PropTypes from 'prop-types'; | |
| const UserInfoForm = (props) => { | |
| const [name, setName] = useState(props.name); | |
| const [email, setEmail] = useState(props.email); | |
| const handleFormSubmit = (e) => { | |
| e.preventDefault(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { createContext } from 'react'; | |
| const UserContext = new createContext(); | |
| export default UserContext; |