Any clue how to solve this error. I tried to fix it by installing the typings for React using the line:
npm install --save-dev @types/react @types/react-dom
- thereafter restarting my IDE and development server, but it still didnt work
I’m still trying to solve it, just in case you can. The help would be awesome!
This is the code, and “props” was giving the error.
import React, {useState} from 'react'; //for user input
import logo from '../public/assets/brand/logo.png';
//import 'boxicons';
export const Login = (props) => {
//Allows gathering of information from the user
const [email, setEmail] = useState('');
const [pass, setPass] = useState('');
//prevents reloading of page, causing us to lose our current state
const handleSubmit = (e: { preventDefault: () => void; }) => {
e.preventDefault();
console.log(email);
}
return(
)
Of course this isnt the whole code, and the only error I had was caused by “props”. The filename is “login.tsx”.