Closed rabbit16 closed 3 months ago
I used react frame.
To begin with, you should never return the MathJaxContext
conditionally like that and also in the middle of a component that it mounted and unmounted between renderings. Follow the instructions in the README : https://github.com/fast-reflexes/better-react-mathjax?tab=readme-ov-file#usage
If the problem persists, I can take another look.
Closing this since no new input has been received, feel free to reopen if more info can be provided.
I've already resolved the issue by downgrading the version of Vite. The original version of Vite was 3.0, and after downgrading to version 2.0 and recompiling, everything worked fine.
I can confirm that it works perfectly with Vite 5 both in development and in production. Haven't tried with Vite 3.
When I import MathJaxContext to display math content and compile it using the command yarn build, an error stating 'f.createElement is not a function' appears on my page. However, the development environment works fine, and the error only occurs after building. I couldn't figure it out. What should I do?
This is content component