ionic-team / stencil-ds-output-targets

These are output targets that can be added to Stencil for React and Angular.
https://stenciljs.com
MIT License
250 stars 118 forks source link

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

Closed christian-bromann closed 2 months ago

christian-bromann commented 2 months ago

Pull request checklist

Please check if your PR fulfills the following requirements:

Pull request type

Please check the type of change your PR introduces:

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?

Other information

n/a