Skip to content

Best practices for rendering lots of Carta instances #130

Answered by BearToCode
tucnak asked this question in Q&A
Discussion options

You must be logged in to vote

Hello,

I'm glad you like this project. You asked quite a lot of questions, I'll try to answer briefly to all of them.

  1. The reason you get that warning from Shiki is because everytime a Carta class is created, it also comes with a new instance of Shiki, an highlighter which is imbedded in the class and used for highlighting markdown in the editor. While I could definetely use a singleton for that now that you point it out (I might create an issue for that), since from what I understand most of your Carta classes are instantiated for the <Markdown> component, you could just use one Carta instance for all of them (should work fine for almost all cases).
  2. I'm not sure about that error: if you …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@tucnak
Comment options

Answer selected by tucnak
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants