React component to render latex strings, based on Katex
npm install --save math-renderer
import React, { Component } from 'react'
import MathRenderer from 'math-renderer'
import 'katex/dist/katex.min.css'
class Example extends Component {
render () {
return (
<MathRenderer value={"Inline expression $\\int_0^\\infty x^2 dx$"} />
)
}
}
Or
class Example2 extends Component {
render () {
return (
<MathRenderer value={"Block expression $$\\int_0^\\infty x^2 dx$$"} />
)
}
}
MIT © bamtak