Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
omranjamal opened this issue Nov 13, 2023 · 0 comments

Comments

@omranjamal
Copy link

<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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant