Questions tagged [prism-react-renderer]
6 questions
3
votes
3 answers
React Dom not updating after updating a state array
so this function updates this state array:
let [Produits, setProduit] = useState(JSON.parse(Devis.produits))
let changeQte = (id, e) => {
let produittable = Produits;
produittable.forEach((p) => {
if (p.id == id) {
…

Fares Harmali
- 33
- 5
2
votes
1 answer
Issue with prism-react-renderer highlighting in production build in Gatsby
I am facing an issue with code highlighting when using prism-react-renderer component in Gatsby. I have configured it as per instructions in FormidableLabs/prism-react-renderer.
Everything works in development mode, but when I build a production…

Subhash
- 3,121
- 1
- 19
- 25
1
vote
1 answer
Enabling syntax highlighting for lisp in Docasaurus website
I'm trying to enable code block syntax highlighting for lisp on my Docusaurus website. I added the following property on my themeConfig:
prism: {
additionalLanguages: ['lisp'],
}
but it didn't seem to do anything. It also seems that I cannot do…

Matt Hauff
- 65
- 7
0
votes
2 answers
Get `useState` Error while using prism-react-renderer in markdown-to-jsx
Using nextjs-13
I want to use prism-react-renderer inside markdown-to-jsx to highlight my code, and I wrote the following code as I understand it
page.tsx
import fs from "fs";
import Markdown from "markdown-to-jsx";
import matter from…
0
votes
1 answer
React function not rerendering with UseEffect and setting state combo
Utilising UseEffect react function and trying to call an API once then render the information, but render post the data being received is not being triggered despite having a call to setState within the fetchdata function call within…

VjLIRT
- 23
- 3
0
votes
1 answer
Why my component in react native is not being re-rendered, after there occurs change in state of the component?
I'm trying to get the dynamic rating and render my dynamic svg component accordingly, but after there occurs a change in state after the user select the star, the component is not being re-rendered,
After the user selects the star from the…

Hardik poudel
- 61
- 4