Next.js Discord

Discord Forum

Experimental ViewTransition doesnt work

Answered
Crucian carp posted this in #help-forum
Open in Discord
Crucian carpOP
Nothing happens, tried everything from the docs, but it just doenst animate.

Im using Nextjs 15.3.1 inside of a monorepo managed by turbo

(My browser does support it, the nextjs demo works properly, and so does the examples on the react docs)
Answered by Crucian carp
I forgot startTransition, and since it wasnt a navigation or any other trigger, the animation didnt play

          onClick={() =>
            startTransition(() => setHidden((current) => !current))
          }
View full answer

1 Reply

Crucian carpOP
I forgot startTransition, and since it wasnt a navigation or any other trigger, the animation didnt play

          onClick={() =>
            startTransition(() => setHidden((current) => !current))
          }
Answer