React-spring: v9 <Transition> bug with NextJS

Created on 8 Jun 2019  路  8Comments  路  Source: pmndrs/react-spring

https://github.com/react-spring/react-spring/issues/325

@aleclarson
I try v9-beta with nextjs look like animation flashing again when I change route with animation.
It works fine on v8 and feels smoother.

v8 example
https://react-spring-325-aszmjdhnnv.now.sh
May-30-2562 08-36-35

v9 example
https://react-spring-325-tkuptdounw.now.sh
May-30-2562 08-35-05

codesandbox (code example but this behavior does not effect on codesandbox)
https://codesandbox.io/s/reactspring-325-vu8en

try to change route between about page and contacts page slowly, you will see flashing white background before they animate.

_Originally posted by @rainstormza in https://github.com/react-spring/react-spring/issues/642#issuecomment-497167320_

bug v9

Most helpful comment

Now available in v9.0.0-rc.2 #985

Demo here: https://codesandbox.io/s/react-spring-699-57yi5

All 8 comments

@rainstormza Can you reproduce without NextJS?

@aleclarson I think it works when used with create-react-app
I think the problem is server-side-rendering.

@drcmda Does v8 fix about SSR problem?

@aleclarson HMR is broken when editing anything in /pages other than _app.js

updated sandbox with 9.0.0-beta.24
https://codesandbox.io/s/react-spring-325-rk3mo

@tim-soft Using the reset prop seems to fix it.

Also, the OP's issue was fixed somewhere between beta.8 and beta.27 馃帀

@aleclarson Animation still flash on v9 beta.31
but it works fine on v8

Whoops, I commented on the wrong issue. Sorry! This one will be fixed in the next canary too, though. 馃槄

Now available in v9.0.0-rc.2 #985

Demo here: https://codesandbox.io/s/react-spring-699-57yi5

Was this page helpful?
0 / 5 - 0 ratings

Related issues

VincentCtr picture VincentCtr  路  3Comments

MaximeDenuit picture MaximeDenuit  路  4Comments

jmcruzmanalo picture jmcruzmanalo  路  4Comments

localjo picture localjo  路  3Comments

cklab picture cklab  路  4Comments