react-floating-whatsapp icon indicating copy to clipboard operation
react-floating-whatsapp copied to clipboard

Add support for next.js, un optimized code causes 226 KB of extra JavaScript first load causing performance issues.

Open itse4elhaam opened this issue 2 years ago • 1 comments

Results with this library:

image

Result after removing it

image

itse4elhaam avatar Sep 16 '23 20:09 itse4elhaam

You can use dynamic import to prevent this, for instance:

const WhatsappChatScript = dynamic(
  () => import('@components/your-floating-whatsapp-component'),
  { ssr: false }
)

mnismt avatar Dec 26 '23 02:12 mnismt