talyssonoc/react-katex

Possible merge?

MatejBransky opened this issue · 2 comments

Hi, I would like to find a common path where we can merge this repo (I used my starter for react lib and the source code is completely rewritten but the readme is forked from yours) with your repo. Do you think it's possible?

Differences:

  • components are merged into the one <TeX> which has props.block for indicating block math (breaking change)
  • KaTeX is moved into the peerDependencies (so users don't need to wait for updating this lib, it should be their responsibility)
  • the size of the lib is now correct because it doesn't include the whole katex library
  • <TeX /> component is memoized (new React.memo(Component)) by default so you can avoid unnecesary rerenders
  • from the previous is clear that it needs React >=16.6.0
  • <TeX /> component accepts other props (like className, id, style,...) which are given to the span/div
  • added props.settings for KaTeX configuration
  • examples in repo are accessible (live) via codesandbox
  • tests are done with Jest (with snapshots) and react-testing-library
  • added husky+lint-staged+prettier-eslint for formatting before commiting
  • it is bundled with microbundle (multiple outputs: ESM, UMD, CJS)

What do you think?

Update:

Hi @talyssonoc, any interest in merging the changes by @MatejBransky into upstream?