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

Lit-element and typescript #50

Open
andreabosman16 opened this issue Oct 8, 2019 · 3 comments
Open

Lit-element and typescript #50

andreabosman16 opened this issue Oct 8, 2019 · 3 comments
Assignees

Comments

@andreabosman16
Copy link

Maybe use lit-element as render engine and use typescript so everything is type safe.
I wanted to use this component with lit-element and redux but got errors, this is because the component uses different setters and getters. These getters and setters conflict with how lit-element handles getting and setting html attributes. I think typescript and lit-element will make maintaining this component allot easier.

@pimdewit pimdewit assigned pimdewit and ciampo and unassigned pimdewit Oct 8, 2019
@ciampo
Copy link
Owner

ciampo commented Oct 8, 2019

Hey @andreabosman16 , thank you for letting me know about your usecase!

I am well aware of lit-html and lit-element, but I always wanted this to be a vanilla Web Component with no dependencies. Regarding Typescript, it's something that I considered, but never thought was really necessary — I have written tests to check types and other potential errors.

I don't see anything wrong with the current setters / getters; they should just be an implementation detail of the properties and attributes of this component.

Can you share with me a sample codepen / codesandbox sketch with your macro-carousel + lit-element + redux setup? I'll have a look at the errors and see what needs to be done to make it work

@phatdunny
Copy link

I'm having a similar issue - lit-html doesn't like this component. Usually that happens when there's a syntax error in your html is wrong, rather than JS or CSS - e.g. you've opened a tag, but haven't closed it. I'll see if I can track down the issue if I get time. Other than that, I'm loving your component - great job! Appreciate the endeavor to keep it vanilla, but lit-html is pretty sweet - if you get a chance. I probably wouldn't recommend lit-element though.

@ciampo
Copy link
Owner

ciampo commented Aug 10, 2020

Hey @phatdunny , thank you for reaching out — I'm glad you like the component!

I did have a look at lit-html and I quite like it, but I don't think it fits in the scope of this project. I may reconsider this if/when I'll work on a v2 of the component (at that point, I may also consider using TypeScript and/or other technologies)

For the purpose of this issue, it would be great if you could help with the lit-html errors — at least with a way of reproducing the errors consistently!

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

No branches or pull requests

4 participants