Skip to content

useTransition re-renders / mounts twice #617

@sasweb

Description

@sasweb

I use useTransition for a transition between screens.
I've implemented this based on the Simple Transition example.

Unfortunately, the entering component renders twice which causes a flickering in my special case (scroll down using ref). I've extended the example for presentation purposes. Please see the console.log. https://codesandbox.io/s/y7wwzyvjkz?fontsize=14

Is there a simple way to avoid this behaviour or is it a bug?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind: bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions