Пример:
import authForm from './modals/authform';
import {useEffect, useState} from "react";
export default function Header(props) {
const [showAuth, setShowAuth] = useState();
return (
<authForm showAuth={showAuth} setShowAuth={setShowAuth}/>
);
}
Ошибка:
React does not recognize the `showAuth` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `showauth` instead. If you accidentally passed it from a parent component, remove it from the DOM element.
Решение:
Изменить регистр при импорте компонента authForm на Authform. Дело в том, что react неверно воспринимает camelCase в качестве компонента.