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
251 stars 117 forks source link

fix(react): don't populate non-primitive objects #498

Closed christian-bromann closed 1 month ago

christian-bromann commented 1 month 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?

We currently serialize arrays with primitive values which Stencil is not able to hydrate properly. I've been looking into a component that got passed in an array of strings which got rendered as child components of that element. However when Stencil hydrated the component, it just added these elements instead of replacing them.

What is the new behavior?

Only allow primitive values to be serialized to avoid such errors from happening.

Does this introduce a breaking change?

Other information

n/a