flip icon indicating copy to clipboard operation
flip copied to clipboard

Import error in next js

Open islamMaruf opened this issue 2 years ago • 1 comments

flip flip2

islamMaruf avatar Feb 06 '23 09:02 islamMaruf

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]);

nelwincatalogo avatar Feb 16 '23 18:02 nelwincatalogo