Quick start - Remix

Remix (React Router 7) client navigation does not reload. Re-init on useLocation().pathname change - same as Next App Router usePathname pattern in Shared/animInit.js:6, but vite via @remix-run/dev vite:dev (not Turbopack).

Usage - Remix root

js
// app/root.tsx
import { Outlet, useLocation } from '@remix-run/react'
import { useEffect } from 'react'
import { initAnimations } from 'gclass-anims'

export default function App() {
  const location = useLocation()
  useEffect(() => { initAnimations() }, [location.pathname])
  useEffect(() => { initAnimations() }, [])
  return <Outlet />
}

// app/routes/_index.tsx
export default function Index() {
  return <div className="appear scroll spawn-up">hello remix</div>
}