# @abhisheknairofficial/use-markdown

> A simple React Hook which lets you use MD files in a React application

Latest version **1.0.0** (published 2020-06-17) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2020-06-17 |
| First published | 2020-06-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 2.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | abhisheknr4@gmail.com |
| Maintainers | abhisheknairofficial |
| Keywords | react, hooks, markdown, react, markdown |

## Links

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

## Dependencies (1)

- [react-markdown](https://npm.io/package/react-markdown.md) ^4.3.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

- 1.0.0 (latest) — 2020-06-17

## README

# useMarkDown

**useMarkDown** is a simple React Hook that lets you show your MD file contents as a React component.
This is built using **React Markdown**, and I have just made a separate one for convenience.

## Installation

Installation is straight-forward. Use either npm or yarn.

```zsh
npm i @abhisheknairofficial/use-markdown
```

or

```zsh
yarn add @abhisheknairofficial/use-markdown
```

## Usage

1. Import into your file as follows:

```js
import useMarkDown from '@abhisheknairofficial/use-markdown'
```

2. Import your MD file similarly

```js
import MARKDOWN_FILE from '../foo/bar/index.md'
```

3. Use it in your component in either of the following ways:

```js
const MyReactComponent = (props) => {
	const myMarkdownData = useMarkDown(MARKDOWN_FILE)

	return <>{myMarkdownData}</>
}
```

or

```js
const MyReactComponent = (props) => {
	return <>{useMarkDown(MARKDOWN_FILE)}</>
}
```

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