Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation for reactivity of <Markdown> #96

Closed
jkruke opened this issue Jul 2, 2024 · 1 comment
Closed

Documentation for reactivity of <Markdown> #96

jkruke opened this issue Jul 2, 2024 · 1 comment

Comments

@jkruke
Copy link

jkruke commented Jul 2, 2024

It took me quite a while to figure out how to reactively update the <Markdown> value until I found this comment:

#80 (comment)

  1. The <Markdown> component is not reactive by design. If you want to make it reactive, you should use the Svelte
    #key block:
{#key value}
 <Markdown {value} {carta} />
{/key}

It would be nice to have some documentation explaining that Markdown is not meant to be reactive and how to realize reactivity if desired (and with mentioning performance concerns).
This information might also be added here: https://github.com/BearToCode/carta/blob/master/packages/carta-md/src/lib/Markdown.svelte#L3

@BearToCode
Copy link
Owner

Good idea, done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants