MathJax in ReactJS form

20 views
Skip to first unread message

Kevin Shen

unread,
May 11, 2017, 7:01:33 PM5/11/17
to MathJax Users
Hi guys,

I'm working with ReactJS on the front-end. I'm trying to create a form which includes a field for math. I want MathJax to rerender the math every time the form changes. I haven't been able to get it to work, I tried adding 

MathJax.Hub.Queue(["Typeset",MathJax.Hub]);

to componentDidMount of my component but it doesn't seem to be working.


Essentially I have a Form component for the user to fill out the form and a Preview component to preview the form.

All help is much appreciated!

Kevin

Peter Krautzberger

unread,
May 15, 2017, 3:31:52 AM5/15/17
to mathja...@googlegroups.com
Hi Kevin,

This seems like a better fit for stackoverflow.

IIUC, componentDidMount can fire too early; try componentDidUpdate.

Peter.

--
You received this message because you are subscribed to the Google Groups "MathJax Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mathjax-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Peter Krautzberger

unread,
May 15, 2017, 3:32:17 AM5/15/17
to mathja...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages