如何在 React Native View 中显示数学方程 [英] How to display Math equations in React Native View

查看:69
本文介绍了如何在 React Native View 中显示数学方程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在 React Native 视图中渲染数学方程?对于 Web 应用程序,我们可以使用 LaTex 或 MathJax 解决方案.但是 React Native 渲染原生组件.使用 WebView 会很糟糕,因为 MathJax 加载每个 WebView 组件都需要时间.我们如何在 React Native 视图(非 WebView)上渲染数学方程?

How to render Math equations in React Native Views? For web applications, we can use LaTex or MathJax solutions. But React Native renders native components. Using WebView will be bad as MathJax loading will take time for each WebView component. How do we render Math equations on React Native Views (non-WebView)?

推荐答案

MathJax 允许你使用 render SVG 所以你可以尝试生成 SVG,然后在 React Native 中渲染它(我很确定它不会开箱即用,但至少它是一种方法)

MathJax let you use render SVG so you may try to generate SVG and then render it inside of React Native ( I am pretty sure that it won't work out of the box, but at least it is a way )

这篇关于如何在 React Native View 中显示数学方程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆