Skip to content

Bug: In react 18, flashing effect appears at the end of exit phase before entering #816

Description

@tranvansang

What is the current behavior?

When clicking the button
image

  • Phase 1: current element's opacity = 1
  • Phase 2: current element's opacity becomes 0 (with animation/transition)
  • Phase 3 (bug, react 18 ONLY): current element's opacity becomes 1 without animation/transition
  • Phase 4: current element disappears
  • Phase 5: next element opacity appears with opacity = 0
  • Phase 6: next element's opacity becomes 1 (with animation/transition)

What is the expected behavior?

Phase 3 shouldn't exist in react 18 renderer.

Could you provide a CodeSandbox demo reproducing the bug?

In demo's index.js, try changing legacyReact value to switch react 18 behav

2022-04-12.08-15-18.mp4

ior.

https://codesandbox.io/s/wonderful-glade-n0n92s?file=%2Fsrc%2Findex.js

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions