Skip to content

Children showed before the wrappers are initiated #26

Description

@bbjerling

The text/children is showed before the wrappers are initiated - causing text to be shown before an in-animation starts.

const WordWrapper: React.FC<WordWrapperProp> = ({ children, wordIndex }) => {
return (
  <span style={{ display: 'block', backgroundColor: 'red' }}>{children}</span> // Actually using a motion.span here. But this is just to show the delay clearly, without framer motion.
);
const MemoizedWordWrapper = React.memo(WordWrapper);

<SplitText WordWrapper={MemoizedWordWrapper}>{text}</SplitText>

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions