-
Notifications
You must be signed in to change notification settings - Fork 186
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
[WIP] lit cheat sheet #1355
base: main
Are you sure you want to change the base?
[WIP] lit cheat sheet #1355
Conversation
A live preview of this PR will be available at the URL(s) below. https://pr1355-18538bf---lit-dev-5ftespv5na-uc.a.run.app/ |
Whoa, awesome!!! I'm reading through now and my first/only comment is that some of the example are really long compared to their main topic. I think the Templating section has the most of this. eg, the event listener expression example could just be a single button and an output element (similar to the common counter example) without validation, etc. It would be great to get in small Task and Context example too, and may an ElementInternals thing (custom state?). |
I was uploading this in hopes of getting something up and running in the live preview. Also I'm not sure how much I can contribute to this because coming up with and subsequently plowing through the boilerplate for example takes up a lot more time than expected and my calendar is getting filled up with other work. My plan forward was either of the following:
|
I can definitely contribute to refining this branch! This is such a good start. |
let me debug get this working in the preview first! |
lol it was a real bug and not a flake. good job, tests! |
I've read through it and it will be a gold mine. I have the same thought as Justin about section length. One thing that stod out was the mention of running on the server in the lifecycle section. Seems a little premature given that the SSR package is still in labs. I think that the lifecycle section could be compacted into a table instead. Would it be reasonable to include a short glossary section? I have a couple of smaller suggestions with the text but I get the impression that we don't want to put these here but in a separate PR. |
Thanks for the look-over Filimon! The nice thing about articles is that they have more of a chance to live as a living document, so lifecycle reference can change over time. Though I do think that this information is very useful for people trying to actually use our SSR package and we should strive to make it easier to use. I also agree with you and think that there needs to be some sort of "labs" warning near that |
Could you write a page about Lit vs React? With comparisons all Lit + Signal solutions instead of React hooks. resources: |
See it here:
https://pr1355-6a15f47---lit-dev-5ftespv5na-uc.a.run.app/articles/lit-cheat-sheet/
This PR also adds lazy loading to lit-example via intersection observer so that we do not load the 300kb TS worker a million times per page and so that it can cache.