react-markdown
- Version 10.1.0
- Published
- 52.6 kB
- 11 dependencies
- MIT license
Install
npm i react-markdown
yarn add react-markdown
pnpm add react-markdown
Overview
React component to render markdown
Index
Functions
function defaultUrlTransform
defaultUrlTransform: (value: string) => string;
Make a URL safe.
{UrlTransform}
Parameter value
URL.
Returns
{string} Safe URL.
function Markdown
Markdown: (options: Readonly<Options>) => ReactElement;
Component to render markdown.
This is a synchronous component. When using async plugins, see or .
Parameter options
Props.
Returns
{ReactElement} React element.
function MarkdownAsync
MarkdownAsync: (options: Readonly<Options>) => Promise<ReactElement>;
Component to render markdown with support for async plugins through async/await.
Components returning promises are supported on the server. For async support on the client, see .
Parameter options
Props.
Returns
{Promise} Promise to a React element.
function MarkdownHooks
MarkdownHooks: (options: Readonly<HooksOptions>) => ReactNode;
Component to render markdown with support for async plugins through hooks.
This uses
useEffect
anduseState
hooks. Hooks run on the client and do not immediately render something. For async support on the server, see .Parameter options
Props.
Returns
{ReactNode} React node.
Type Aliases
type AllowElement
type AllowElement = import('./lib/index.js').AllowElement;
type Components
type Components = import('./lib/index.js').Components;
type ExtraProps
type ExtraProps = import('./lib/index.js').ExtraProps;
type HooksOptions
type HooksOptions = import('./lib/index.js').HooksOptions;
type Options
type Options = import('./lib/index.js').Options;
type UrlTransform
type UrlTransform = import('./lib/index.js').UrlTransform;
Package Files (2)
Dependencies (11)
Dev Dependencies (21)
Peer Dependencies (2)
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/react-markdown
.
- Markdown[](https://www.jsdocs.io/package/react-markdown)
- HTML<a href="https://www.jsdocs.io/package/react-markdown"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 3082 ms. - Missing or incorrect documentation? Open an issue for this package.