talyssonoc / react-katex

Display math in TeX with KaTeX and ReactJS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Improve examples

talyssonoc opened this issue · comments

They seem too raw right now.

Thanks for this great component!

For the examples, I would like to see something along this line: We are using this for both client side and server-side rendering;

import React from "react";
import {BlockMath, InlineMath} from "react-katex";

export function YourComponent(){
     return <BlockMath math="\alpha + \beta"/>
}

Right now this gives an error message.

@talyssonoc Hey I just made some changes to the README. This sparsity issue with examples is really a more general problem with the Usage section, so I

  • Changed the title to Usage
  • Added explanation for peer dependency up-front to save people some time
  • added usage examples for both the typical named import and using the dist files.

The PR is here: #29