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

Clean up insertion of custom element tag #5

Open
1 of 5 tasks
hasanhaja opened this issue Sep 16, 2023 · 0 comments
Open
1 of 5 tasks

Clean up insertion of custom element tag #5

hasanhaja opened this issue Sep 16, 2023 · 0 comments

Comments

@hasanhaja
Copy link
Owner

hasanhaja commented Sep 16, 2023

Problem

I'm currently swapping <tag> with <tag ref={wc}> for React. This is brittle if I want to introduce custom elements with attributes.

Todo

  • Add better regex to match and insert ref without replacing the whole tag
  • Add custom elements manifest analyzer to the project
  • Programmatically insert attributes into the webc component (assuming one custom elements definition in the script)
  • Consider auto-creating props file (or appending to it if it already exists)
  • Generalize for n custom elements definition

Resources

https://custom-elements-manifest.open-wc.org/analyzer/getting-started/
https://dev.to/thepassle/reactifying-custom-elements-using-a-custom-elements-manifest-2e
https://github.com/thepassle/cem-plugin-reactify

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

No branches or pull requests

1 participant