prism-react-renderer
prism-react-renderer copied to clipboard
page fails to render
I have installed prism-react-renderer with:
npm install prism-react-renderer
Then in a component, I do:
import Highlight, { defaultProps } from "prism-react-renderer";
So far so good, no errors.
But when I try to test syntax highlighting from the same component with:
const CodeBlock = `
<p>Test.</p>
`
<Highlight language="html" code={CodeBlock}></Highlight>
I still get no errors in the console (success Re-building development bundle
), but I get a blank page in the browser.
Any idea what could be going wrong or how to troubleshoot this? Many thanks in advance.
Do you have errors in the browser console? Can you post a reproduceable example?