Please check if your PR fulfills the following requirements:
[x] Tests for the changes have been added (for bug fixes / features)
[x] Docs have been reviewed and added / updated if needed (for bug fixes / features)
[x] Build (npm run build) was run locally for affected output targets
[x] Tests (npm test) were run locally and passed
[x] Prettier (npm run prettier) was run locally and passed
Pull request type
Please check the type of change your PR introduces:
[x] 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?
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.
Pull request checklist
Please check if your PR fulfills the following requirements:
npm run build
) was run locally for affected output targetsnpm test
) were run locally and passednpm run prettier
) was run locally and passedPull 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