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

Passing of props on WithSkiaWeb #2321

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Passing of props on WithSkiaWeb #2321

wants to merge 2 commits into from

Conversation

nahn20
Copy link

@nahn20 nahn20 commented Mar 28, 2024

As far as I can tell, there was previously no good way to pass props directly into the component loaded by WithSkiaWeb. This pull request adds a typed componentProps field that's forwarded to the result of getComponent. It matches the types of the corresponding component, and if there's any required fields, componentProps itself is required. I believe this covers the full breadth of type-safety.

This pull request does swap WithSkiaProps from being an interface to being a type. This shouldn't cause any issues, but if there's a strong preference for an interface here I can investigate other solutions.

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.

None yet

1 participant