-
Notifications
You must be signed in to change notification settings - Fork 908
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
Author Docs for usage in React #4433
Comments
We have a few TSX clients now that might bump this priority |
Any guidance on how should I use @material/web on my react application? |
Sorry we've been racked with post 1.0 bug work and haven't gotten around to docs. Our recommendation for the docs (and for future auto-generation) is to use it's 1.19k and 695B gzipped. It was well utilized in labs and just got released as stable. If you want to use it in Nextjs SSR use |
Thank you for replying. I was able to make it work earlier using I will leave an example here, just in case someone else is wondering how to use
Now it is just a matter to import this default export and use it on the views. @e111077, I am struggling to understand what and how many events each component dispatch in order to attach appropriated listeners on the |
unfortunately this is us lacking documentation. We need to manually annotate each element class with the proper For example, we annotated Menu as a test of our docs automations here: https://material-web.dev/components/menu/#events-2 In the meantime, and until we officially vend React wrappers, it might make sense to expose them as-needed if you (understandably) don't want to scour our code for |
Thank you so much for your example, it saved me a lot of time! I can't believe the docs are not explicit on how to use the components in react js |
The two lil' devs over here would love a docs PR to help 🥲 |
Codegen anyone? |
The lit analyzer which would be used to codegen this was not working with this project until about 2 weeks ago. This would be an interesting project for someone to take on to automate the lit-cli's gen react wrappers command. Here is an example PR for the expected output. |
We (Grayhat) are working on a thin React wrapper which is in-sync with this repository. It's in its early stages, we'd appreciate any help. |
Two phases:
@lit/react
+ Lit SSR NextJS integration libraryThe text was updated successfully, but these errors were encountered: