React Web Monetization

#1

I’ve been playing around with a React library for Web Monetization, using React Hooks

The goal is to enable React developers to:

  • Hide ads for users that have Web Monetization enabled
  • Show a thank-you message to users who have Web Monetization enabled
  • Display counters to show Web Monetized users how much the site has received

Things that it cannot do:

  • Securely show premium content (this library can help but it requires server-side code too)
  • Add the Web Monetization meta tag to your site (the meta tag must be there at page load before any JS runs, as per the RFC)

I’d love to get some feedback on the API, especially from anyone who wants to try it out on their own site! It’s available on NPM as react-web-monetization.

7 Likes