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

Import error in next js #55

Open
islamMaruf opened this issue Feb 6, 2023 · 1 comment
Open

Import error in next js #55

islamMaruf opened this issue Feb 6, 2023 · 1 comment

Comments

@islamMaruf
Copy link

flip
flip2

@nelwincatalogo
Copy link

Try it like this

useEffect(() => {
    let Tick = null;
    (async () => {
      Tick = (await import('@pqina/flip')).default;
      tickInstance = Tick.DOM.create(tickRef.current, {
        value: value,
      });
    })();

    return () => {
      if (tickInstance) {
        Tick.DOM.destroy(tickRef.current);
      }
    };
  }, [value]);

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

2 participants