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
Improve documentation for npm usage #86
Comments
You're right, we can do better in our ReadMe. I'll take a shot at that before our upcoming 4.0 release, and give you a heads up so that you can review what we've written. Sound good? |
Sounds great, thanks :). Let me know if you need help. |
I've added a Quick Start section near the top of the ReadMe. @NudelSieb Please take a look and let me know what you think. |
@JanMiksovsky thanks, that's fine now. Maybe add an example for usage in frameworks, e.g. React or Stencil. I used the follwing in Stencil:
|
Also on another note, I noticed that the component-specific docs could be easier to consume. What's missing is usage examples on how to use the component declaratively (and maybe imparatively). How do I set props/attributes on the element, does that even work? Concrete examples on how to set attributes and register events are necessary for newcomers. I propose that simple usage examples sit at the top and more complex API documentations follows for people who want to dive deaper. I could imagine code snippets to sit underneath each visual example (that you already have). So one does not have to open devtools/inspector. This would help the lib to get faster traction and adoption. |
Hi @JanMiksovsky how would use a component declaratively in JSX? You added the |
I just answered my own question.
This registers |
Yes, the |
One more thought. You provide TS support for the mixins but not for the components. Any reason why? Any tips on how to get going in a webcomponent project based on TS? |
@zenwork Elix supports TypeScript for both mixins and components. The components don't require separate .d.ts files because TypeScript can generally infer the necessary information about the component from the .js files alone. Using Elix in a TypeScript project is essentially the same as in a JavaScript project. Add the I'm going to close this out since I believe the original issue has been addressed. If you have general questions about using Elix, please feel free to send mail to jan@component.kitchen. I'd be interested in hearing more about where you'd like to use the Elix components. |
It's simply not clear how to use it when installing it from here https://www.npmjs.com/package/elix
Some examples (e.g. carousel component) would be appreciated and could improve adoption and general interest in the library.
The text was updated successfully, but these errors were encountered: