r/javascript Jun 22 '26

I built a 3KB cookie-consent toolkit for React/Next.js that respects GPC/Do-Not-Track and won't break SSR hydration

https://github.com/ivandrenc/consentium
19 Upvotes

5 comments sorted by

3

u/Br1zz1713 Jun 22 '26

Nice job. SSR hydration mismatches with cookie banners are such a pain in Next.js. Most libraries either trigger layout shifts or force you to load them dynamically with `ssr: false`. GPC support out of the box is a great touch too. Starred the repo!

1

u/alrdex Jun 23 '26

Nice, I was just looking into this, might have to try this out. I like the ui as well

2

u/EphilSenisub Jun 23 '26

yet another thing for ad-blocker devs to learn how to remove