I've run into this issue before, and most LaTeX renderers in React (like react-latex or KaTeX) only support math, not full document rendering.
The best way I found to fully render a LaTeX document inside React is to use latex.js. It actually processes complete LaTeX documents, including \documentclass{}, \section{}, \textbf{}, etc., and converts them into proper HTML.
If you need pixel-perfect LaTeX rendering, your best bet is generating a PDF using pdflatex and embedding it in an . But if you want direct HTML output inside your app, latex.js is the way to go.