I have a very complicated MathJax rendered equation with interactive elements inside it. This is rendered inside a react component, but, MathJax is absolutely non-compatible with react.
So I am now in the position of having a react app which renders a MathJax element with interactive elements (buttons, inputs).
Taken aside that this is a big no-no, but what is the safest way to:
- Update an input field value
- Bind a onClick action to a button
And have them become part of the state of a component?
Should I use standard js (document.querySelectorAll and addEventListener) inside the react component that update the state or is there a better way to achieve this?
Thanks for any help, input!
Please remember that short of rewriting mathJax my hands are tied in this matter.