0.2.1 • Published 25 days ago

@nulib/use-markdown v0.2.1

Weekly downloads
-
License
-
Repository
-
Last release
25 days ago

@nulib/use-markdown

React hook for handling of Markdown in web applications with support for GitHub flavored markdown content.

Usage

Install the hook using your dependency manager.

npm i @nulib/use-markdown

Import the hook into your React application.

import React from "react";
import useMarkdown from "@nulib/use-markdown";

const MyComponent = () => {
  const markdown = "# Heading 1";

  // returns both raw html and a jsx component with innerHtml content
  const { html, jsx } = useMarkdown(markdown);

  return <div>{jsx}</div>;
};

export default MyComponent;

Development

Run in development environment.

npm i
npm run dev

A browser session will begin:

  VITE v5.2.8  ready in 84 ms

  ➜  Local:   http://localhost:5173/
  ➜  Network: use --host to expose
  ➜  press h + enter to show help
0.2.1

25 days ago

0.2.0

28 days ago

0.1.4

28 days ago

0.1.3

28 days ago

0.1.2

28 days ago

0.1.1

28 days ago

0.1.0

28 days ago