Still digging, at this point not sure if it's a TS or React issue, but using a very simple ArtCard component version of what ikraam shared
import { Link } from "@tanstack/react-router";
import type { ArtPiece } from "data/art-pieces";
import { useState } from "react";
import { cn } from "utils/cn";
export function ArtCard({ artPiece }: { artPiece: ArtPiece }) {
const [isHovered, setIsHovered] = useState(false);
return (
<article
className="group relative"
onMouseEnter={() => setIsHovered(true)}
onMouseLeave={() => setIsHovered(false)}
>
<Link
to="/art/$id"
params={{ id: artPiece.id }}
aria-label={`View details for ${artPiece.title} by ${artPiece.artist}`}
className="block"
>
<div className="relative overflow-hidden bg-neutral-100">
<div className="relative h-full w-full">
<img
src={artPiece.imageUrl}
alt={`${artPiece.title}oooooOoooooo`}
className={cn(
"block h-full w-full object-cover transition-opacity duration-300"
)}
/>
</div>
</div>
</Link>
</article>
);
}
adding one more single o letter in that image alt tag will make the page do that whole streaming template thing, if I keep the same number of os, works fine. I don't know if that's due to byte size, or just somewhat of a race condition in terms of what finishes before the other (layout vs. body).
but yea, digging through, just sharing findings