Server error in react.js default export component

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

  1. 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”.

Hard to diagnose the problem visually because there isn’t much to go off of, but have you tried destructuring like so, ({props}). if you’re passing in more than one prop you may be causing an error.

What happens when you just put export default for your Login component?