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

fix(react): use property mapping from component meta #484

Merged
merged 3 commits into from
Sep 28, 2024

Conversation

christian-bromann
Copy link
Member

Pull request checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)
  • Build (npm run build) was run locally for affected output targets
  • Tests (npm test) were run locally and passed
  • Prettier (npm run prettier) was run locally and passed

Pull request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

What is the current behavior?

When server side rendering SSR components, we currently de-camelize the property name which is a wrong assumption, given Stencil user give their properties arbitrary names, e.g. when the attribute property is used:

@Prop({ attribute: 'multi-line', reflect: true, mutable: true }) isMultiLine: boolean = false;

What is the new behavior?

The patch makes the output target pass along the mapping for attributes that Stencil then uses later when it hydrates the component.

Does this introduce a breaking change?

  • Yes
  • No

Other information

n/a

Copy link
Member

@tanner-reits tanner-reits left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@christian-bromann christian-bromann merged commit 199349c into main Sep 28, 2024
5 checks passed
@christian-bromann christian-bromann deleted the cb/recognise-custom-props branch September 28, 2024 21:51
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

Successfully merging this pull request may close these issues.

2 participants