Skip to content

Children showed before the wrappers are initiated #26

@bbjerling

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>

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