Closed ttasovac closed 2 months ago
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.
success Re-building development bundle
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?
I have installed prism-react-renderer with:
Then in a component, I do:
So far so good, no errors.
But when I try to test syntax highlighting from the same component with:
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.