# @osequi/use-markdown

> A React hook to load Markdown files

Latest version **0.1.1** (published 2020-09-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install @osequi/use-markdown
pnpm add @osequi/use-markdown
yarn add @osequi/use-markdown
bun add @osequi/use-markdown
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.1 |
| Published | 2020-09-25 |
| First published | 2020-09-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 3.2 KB |
| Known vulnerabilities | 0 (+3 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Csongor Bartus |
| Maintainers | osequi |
| Keywords | react, hook, markdown |

## Links

- npm: https://www.npmjs.com/package/@osequi/use-markdown
- Repository: https://github.com/osequi/use-markdown
- Homepage: https://github.com/osequi/use-markdown#readme
- Issues: https://github.com/osequi/use-markdown/issues
- npm.io page: https://npm.io/package/@osequi/use-markdown

## Dependencies (2)

- [react](https://npm.io/package/react.md) ^16.13.1
- [marked](https://npm.io/package/marked.md) ^1.1.1

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 0.1.1 (latest) — 2020-09-25
- 0.1.0 — 2020-09-25

## README

# use-markdown

A React hook to load Markdown files.

## Features

- Loads a markdown file then parses with `marked`.
- Returns the parsed markdown.

## Demo

- https://use-markdown-demo.vercel.app

## Install

```sh
# Using yarn
yarn add @osequi/use-markdown

# or, using npm
npm i @osequi/use-markdown
```

## Usage

```js
// demo/src/App.js
import useMarkdown from "use-markdown";
import readme from "./README.md";

const App = () => {
  const { markdown } = useMarkdown(readme);
  const html = <div dangerouslySetInnerHTML={{ __html: markdown }} />;

  return <>{html}</>;
};
```

## Test

In `/demo` there is a Create React App.

## Changelog

Please check [CHANGELOG.md](CHANGELOG.md).

Generated with [Unleash](https://github.com/Netflix/unleash) using [Conventional changelog](https://github.com/conventional-changelog/conventional-changelog) and [Semantic versioning](https://semver.org/).

---
_Source: https://npm.io/package/@osequi/use-markdown · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
