Improve examples
talyssonoc opened this issue · comments
Talysson de Oliveira Cassiano commented
They seem too raw right now.
Ge Yang commented
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.
Ge Yang commented
@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