react-native-mathjax
react-native-mathjax copied to clipboard
Visibility hidden causing lag issue while rendering
<script type=“text/x-mathjax-config”>
MathJax.Hub.Config(${options});
MathJax.Hub.Queue(function() {
var height = document.documentElement.scrollHeight;
window.ReactNativeWebView.postMessage(String(height));
document.getElementById(“formula”).style.visibility = ‘’;
});
</script>
<script src=“https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js”></script>
<div id=“formula” style=“line-height: 1.7;“>
${content}
</div>```
Please replace the code in index.js file with the above snippet to solve the lag problem.
remove visibility hidden style and add a line-height of 1.7 (for better line spacing) to prevent the lag.
i reslve my prblem by adding this style