0.1.3 • Published 2 years ago
react-highlighter.js v0.1.3
React-highlighter.js
You can see the demo here.
Cool things:
- 🧱 Easy to use
- 🏎 Blazingly fast
- 👍 Great for beginners
How do you use it?
Well, install it.
npm i react-highlighter.js
Or:
yarn add react-highlighter.js
Then, in a react app:
import Monaco from "react-highlighter.js";
import { CodeBlock} from "react-highlighter.js";
...
<Moncaco
lang="javascript"
theme="vs-dark" // This is the default... It is optinial.
height="50vh"
>{`// some code here...`}
</Monaco>
<CodeBlock lang="javascript">
{`// some code here...`}
</CodeBlock>
...
That is all you need!!!