Category "react-spring"

cannot use react-spring (Uncaught Invariant Violation: Invalid hook call)

import logo from "./logo.svg"; import "./App.css"; import { useSpring, animated } from "react-spring"; function App() { const props = useSpring({ to: { opacit

React - Cannot read properties of undefined (reading 'pathname')

I don't understand why the error appears. My task is to make animation between Routes. Can you suggest where I made a mistake? enter image description here I us