DEV Community

Peter Chan
Peter Chan

Posted on

9 5

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

Demo

App

Link to Code

Repo

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 now.sh

Speedy emails, satisfied customers

Postmark Image

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

Top comments (1)

Collapse
 
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', () => {
    document.getElementById('exclusive').classList.remove('hidden')
  })
}

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay