gdpr-cookie-consent-banner icon indicating copy to clipboard operation
gdpr-cookie-consent-banner copied to clipboard

React version?

Open ilPas opened this issue 4 years ago • 3 comments

Is in roadmap? Or is there a possibility to use this awesome package with React?

Thanks a lot

ilPas avatar May 30 '20 13:05 ilPas

Hi @ilPas

You can use the package with React by following the Javascript instructions in the README. I'm afraid I don't use React so I can't give any more specific instructions.

antony avatar May 30 '20 15:05 antony

I try but i'm not expert, there is an error _beyonk_gdpr_cookie_consent_banner__WEBPACK_IMPORTED_MODULE_6___default(...) is not a function

ilPas avatar Jun 01 '20 07:06 ilPas

Sadly I'm not a React or Webpack user. From what you've listed there, it seems like your webpack configuration isn't quite correct, since the default export of the esm bundle is a function called attachBanner which is indeed a function.

antony avatar Jul 28 '20 15:07 antony

Example with react. https://codesandbox.io/p/sandbox/gifted-tess-jg7yo1

As I can understand this library just provide some ui for GDPR

Akiyamka avatar Dec 09 '22 15:12 Akiyamka

is this work for astro.build?

Vibeesarma avatar Dec 11 '22 07:12 Vibeesarma

I've never tried, but yes, it should work with anything.

antony avatar Dec 11 '22 09:12 antony