DEV Community

Peter Chan
Peter Chan

Posted on

a Weather App with Monetization Feature

[Instructions]: While I am still waiting for the free-trial account Coil, I am trying to build something basic but meaningful for experimenting with the Monetization API.

What I built

  • a Simple Weather App with Monetization Feature
  • Currently, if the Monetization API along Coil plugin at the client side is properly implemented, a "Thank you" message will be displayed
  • If the client does not implement Monetization feature on his/her browser, the "Monetization Feature Available" message will be shown instead

Submission Category: Exciting Experiments



Link to Code


How I built it

I implement this application by React.js with Hooks. Realtime weather info is fetched on OpenWeather API. The Application is styled by CSS along with Bootstrap.

Additional Resources/Info

Deployed Demo on

Top comments (1)

cyberdees profile image
☞ Desigan Chinniah ☜

Quick feedback. I seem to get the same Monetization Feature Available message in both scenarios right now ie. with or without a Web Monetization provider (Coil) membership.

Are you perhaps correctly checking for 'monetizationstart'?

if (document.monetization) {
  document.monetization.addEventListener('monetizationstart', () => {