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 component props from attrs not respecting provided transient props #48

Conversation

kivvvvv
Copy link
Contributor

@kivvvvv kivvvvv commented Aug 12, 2024

Summary

Summary: This PR addressed a bug when transient props(transientProps()) is provided/used with attrs(attrs()), the rendered component props is not respecting provided transient props.

Problem: On transient props function body, shouldForwardProp, an argument that refers to the provided transientProps, is not passed along as the result of the execution, so the closure in the next execution, that is used to execute attrs, is lost and cannot capture the already defined transientProps, resulting in incorrect rendered component props, the props is not filtered by transientProps.

Solution: Pass along the transientProps to the template, so that, it is available when executing attrs

Copy link

vercel bot commented Aug 12, 2024

@kivvvvv is attempting to deploy a commit to the Argos CI Team on Vercel.

A member of the Team first needs to authorize it.

@gregberge gregberge force-pushed the fix/component-props-from-attrs-should-respect-transient-props branch from 3b9823a to b48d22d Compare August 18, 2024 10:03
@gregberge gregberge merged commit 9a3c5b0 into gregberge:main Aug 18, 2024
4 of 5 checks passed
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