1.2.1 • Published 2 years ago

atomico-use-head v1.2.1

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

atomico-use-head

npm npm Codecov Bundle Size Conventional Commits

Atomico hook for interacting with the document head.

Installation

Install using npm:

$ npm install atomico-use-head

Or use in browsers with Skypack:

<script type="module">
  import { useHead } from "https://cdn.skypack.dev/atomico-use-head";
</script>

Usage

Use the useHead() hook to set the contents of the document head from your component:

import { c } from "atomico";
import { useHead } from "atomico-use-head";

function component() {
  useHead({
    title: "Hello World!",
  });

  return (
    <host>
      <p>The title of this document is `Hello World!`</p>
    </host>
  );
}

customElements.define("hello-world", c(component));

License

Copyright 2022 Kepler Sticka-Jones. Licensed ISC.

1.2.1

2 years ago

1.2.0

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago