atomico-use-remark
v1.1.0
Published
Atomico hook for interacting with Remark
Downloads
171
Maintainers
Readme
atomico-use-remark
Atomico hook for interacting with Remark.
Installation
Install using npm:
$ npm install atomico-use-remark
Or use in browsers with Skypack:
<script type="module">
import { useRemark } from "https://cdn.skypack.dev/atomico-use-remark";
</script>
Usage
Use the useRemark()
hook to render some Markdown content in your component:
import { c } from "atomico";
import { useRemark } from "atomico-use-remark";
function component() {
const [tree, setContent] = useRemark(`
# Hello World!
`);
return <host>{tree}</host>;
}
customElements.define("hello-world", c(component));
License
Copyright 2022 Kepler Sticka-Jones. Licensed ISC.