[Feature]:@twind/with-web-components support function components and/or existing element instances using withTwind #483
Labels
🛑 Abandoned
The issue or Pull Request will not be worked on
✨ Feature Request
Something should be added
Describe the problem
The
withTwind
implementation is setup to extend a class, which works well for the example use case.However, when working with functional components, there are no classes to extend. This is the case when using SolidJS, which is what I am using.
see: https://www.solidjs.com/guides/faq#can-you-add-support-for-class-components-i-find-the-lifecycles-are-easier-to-reason-about
I'll share my functional work around, however this is not meant to be a final solution, just a proof of concept.
in
with-web-components.js
This change is not robust since it removes the class based implementation completely. Is there a better approach to solve this issue?
thank you!
Describe the proposed solution
support instances when using the
withTwind
functionIdeally, this would support Component Register mixins, see: https://github.com/ryansolid/component-register
Alternatives considered
I'm still relatively new to the web component eco system and could be missing something.
Importance
I cannot use Twind without it
Additional Information
Without this feature I would not be able to use twind.style with solidjs, but would instead be limited to twind.dev
The text was updated successfully, but these errors were encountered: