Skip to content
Discussion options

You must be logged in to vote

You just need to register them and then you can use them normally in the templates. It depends if the library requires you to call a register function explicitly or not. For example, Fluent UI requires it but Shoelace does not.

Jordan Marr does use importDynamic here: https://github.com/JordanMarr/fable-lit-fullstack-template/blob/ebb39776725190bea6915d82b30d62889bd7ac6b/Template/WebLit/src/Registrations.fs

But if you want to import things statically, importSideEffects should work too (this also allows you to include the components in your bundle). This example is for Solid, but it should work the same in Lit:

  1. Import the component
  2. Use it in a template

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by leolorenzoluis
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