Closed mark-wiemer closed 1 year ago
Hi there!
Thanks for the question, before I even start digging into this, did you add the dynamic
property to the MathJax
component as you should when the content will change after initial rendering? :)
Resolved, thanks. I just needed to add dynamic
🤦🏻
Thanks for submitting this issue! dynamic={true}
This fixed my Heroku production bug as well. Whew!
npm start
and change the input to1+2
: you'll see the MathJax render correctlynpm run build && serve -s build
, change the inputExpected: MathJax renders correctly
Actual: MathJax just renders as plaintext
Notes: Debugging via sources tab shows the same value is stored for the
latex
variable inApp.tsx
. Without special text, theReact Components
tab provided by React Developer Tools Chromium extension shows the same children to the component.However, when rendering a fraction, the prod build shows a single backslash provided as a child
\frac{1}{2}
instead of\\frac{1}{2}
, which is how thenpm start
build works.npm start
build:Optimized production build:
One backslash:
Two backslashes: