React component and hook to use remark to render markdown
useRemarkSync
useRemarkSync
Full Changelog: https://github.com/remarkjs/react-remark/compare/v2.0.3...v2.1.0
Correct typo in module entrypoint
update documentation to reflect move to remarkjs organization
Add "sideEffects": false
to allow webpack to fully tree shake https://webpack.js.org/guides/tree-shaking/#mark-the-file-as-side-effect-free
react-markdown has a new name (generously donated by @aaronccwong, thank you!), a new version of remark, and new maintainers (@remarkjs)!
react-remark
v1This component used to be based on remarkable
it is now based on remark
.
If you are interested in migrating
<ReactRemark source={'# This is markdown!'}>
would become
<ReactRemark>{`# This is markdown!`}</ReactRemark>
in the new release.
@christianmurphy/react-remark
The new npm package name is react-remark
the version jumped from 0.3.1 to 2.0.0, due to a previous remarkable
based version released as version 1.
:warning: Breaking Change :warning: remark
has updated to version 13 https://github.com/remarkjs/remark/releases/tag/13.0.0
This upgrade means that by default only CommonMark is supported out of the box, if you need GitHub Flavored Markdown features, like tables and autolinking, please add remark-gfm
as a plugin.
For example:
import { Remark } from 'react-remark';
import remarkGfm from 'remark-gfm';
// ...
<Remark remarkPlugins={[remarkGfm]}>{content}</Remark>
This also means all remark
plugins must be updated to versions that support remark
13.