Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

redirect route after registration on mysql by axios post method

    import { useNavigate } from 'react-router-dom';

    const navigate = useNavigate();

    const onSubmit = data => {
        axios.post('http://localhost:5001/insertInfo', data)
        navigate('/login');
     };
 
PREVIOUS NEXT
Tagged: #redirect #route #registration #mysql #axios #post #method
ADD COMMENT
Topic
Name
6+6 =