Get started with mercury CDN

MIT licensed

Mercury: Pre-renders JS components into static HTML, then hydrates with JS for fast front-ends.

Tags:
  • framework
  • frontend
  • virtual
  • react
  • modular
  • web

Stable version

Copied!

How to start using mercury CDN


<!DOCTYPE html>
<html>
<head>
  <title>Get started with mercury CDN - cdnhub.io</title>
  <script src="https://cdn.cdnhub.io/mercury/14.2.0/mercury.min.js"></script>
</head>
<body>
  <button id="myButton">Click me!</button>
  <script>
    const button = document.getElementById('myButton');

    mercury.patch(button, {
      onClick: () => {
        console.log('Button clicked!');
      }
    });
  </script>
</body>
</html>
Copied!
Copied!

All versions