Skip to content

Using preRenderFirstString and splitter together are incompatible if splitter splits words.  #44

@omranjamal

Description

@omranjamal
<TypeAnimation
  sequence={[
    "hello world, this is kinda cool",
    2000,
    "magical machines they are; computers",
    2000,
    "down with the tyrants",
    2000,
  ]}
  preRenderFirstString={true}
  splitter={(text) => text.split(" ")}
/>

The above code causes the library to not animate to the next string.

  1. Splitting each character via splitter={(text) => text.split("")} works just fine though.
  2. Oddly enough, if I'm splitting by spaces and set preRenderFirstString={false} then it also works just fine.

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