React Hook "useDispatch" is called in function "loginForm" which is neither a React function component or a custom React Hook function react-hooks/rules-of-hooks
I got this kind of message. Attached code...
import React from 'react'
import { useDispatch} from 'react-redux'
const loginForm = () => {
const dispatch = useDispatch()
return (
<div>lgoinForm</div>
)
}
export default loginForm