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

Document React + custom element quirks #32

Closed
geoffrich opened this issue Apr 26, 2021 · 1 comment
Closed

Document React + custom element quirks #32

geoffrich opened this issue Apr 26, 2021 · 1 comment
Labels
help wanted Extra attention is needed, this user requires assistance to complete the work Type: Feature New Feature

Comments

@geoffrich
Copy link
Contributor

geoffrich commented Apr 26, 2021

Is your feature request related to a problem? Please describe.

React doesn't play nice with custom elements. We should document some of the common pitfalls and workarounds. Most of these are already shown in AuroReactDemo, but explicit documentation is also necessary instead of just a code demo.

Describe the solution you'd like

Document React quirks:

  • Setting properties on custom elements (though I'm not sure how many array/object properties we have in Auro at the moment. I know inputoptions used to be a big pain point, but that uses slots now)
  • Listening to custom component events (see also: Component event strategy auro-radio#26)
  • Removing boolean attributes

This CSS tricks article is a good source of knowledge for this.

Describe alternatives you've considered

Leave people in the dark? 😁

If we provided a React wrapper, most of these issues could go away.

Additional context

This came out of a discussion with the Flight Changes team.

Exit criteria

I'd like to see this information added to the React demo and a link to that document in the doc site's Support/FAQ section.

@blackfalcon
Copy link
Member

Closing this issue as the action will take place in the React Demo, not specifically the doc site.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed, this user requires assistance to complete the work Type: Feature New Feature
Projects
None yet
Development

No branches or pull requests

2 participants