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

feat: implement support for vanilla JS components in onRenderValue (WIP) #398

Merged
merged 5 commits into from
Feb 2, 2024

Conversation

josdejong
Copy link
Owner

@josdejong josdejong commented Jan 24, 2024

Implements a solution for #375, this allows to use vanilla JS components in onRenderValue by defining a Svelte Action:

export interface MyComponentProps {
  // ...
}

export const MyComponent = Action<HTMLDivElement, MyComponentProps> = (node, props) => {
  // ...
  return {
    update: (props) => {
      // ...
    },
    destroy: () => {
      // ...
    }
  }
}

TODO:

  • Fix TypeScript issues
  • Write docs

@josdejong josdejong changed the title feat: implement support for vanilla JS components in onRenderValue feat: implement support for vanilla JS components in onRenderValue (WIP) Jan 24, 2024
@josdejong josdejong merged commit db482ea into main Feb 2, 2024
4 checks passed
@josdejong josdejong deleted the feat/render_vanilla_component branch February 2, 2024 15:07
@josdejong
Copy link
Owner Author

Published now in v0.21.5

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

Successfully merging this pull request may close these issues.

1 participant