import React, { useState } from 'react'; import axios from 'axios'; const Register = () => { const [username, setUsername] = useState(''); const [password, setPassword] = useState(''); const handleRegister = async (e) => { e.preventDefault(); try { const response = await axios.post('http://localhost:5000/register', { username, password, }); console.log(response.data); } catch (error) { console.error(error); } }; return (