Skip to content

[bug]: Animation flickers on React Native New Architecture #2369

Open
@wojtekmaj

Description

@wojtekmaj

Which react-spring target are you using?

  • @react-spring/web
  • @react-spring/three
  • @react-spring/native
  • @react-spring/konva
  • @react-spring/zdog

What version of react-spring are you using?

9.7.5

What's Wrong?

Animation flickers:

Nagranie.z.ekranu.2025-04-28.o.23.19.37.mov

To Reproduce

Nothing fancy really:

  const wrapperTransitions = useTransition(isOpen, {
    from: {
      opacity: 0,
      scale: 0.7,
    },
    enter: {
      opacity: 1,
      scale: 1,
    },
    leave: {
      opacity: 0,
      scale: 0.7,
    },
    config: config.gentle,
    onDestroyed: () => {
      if (isOpen) {
        return;
      }

      onDestroyed?.();
    },
  });

  return wrapperTransitions(
    (props, showDialog) =>
      showDialog && (
        <Overlay>
          <Wrapper
            as={AnimatedWrapper}
            aria-label={ariaLabelString}
            style={{
              transform: [{ scale: props.scale }],
              opacity: props.opacity,
            }}
          >
            <TitleAndContentWrapper>
              <Title>{title}</Title>
              <ContentWrapper>{children}</ContentWrapper>
            </TitleAndContentWrapper>
          </Wrapper>
        </Overlay>
      ),
  );

Expected Behaviour

No flicker

Link to repo

Can't provide a sandbox for RN

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