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

Make children optional in Provider's typings #4205

Merged
merged 2 commits into from Nov 11, 2023

Conversation

shicks
Copy link
Contributor

@shicks shicks commented Nov 11, 2023

Without this, it's an error to write <Context.Provider value={...}> since TypeScript expects a children prop to be explicitly provided. It's easy enough to work around by adding children={[]}, but this shouldn't be necessary.

Without this, it's an error to write `<Context.Provider value={...}>` since TypeScript expects a `children` prop to be explicitly provided.  It's easy enough to work around by adding `children={[]}`, but this shouldn't be necessary.
@coveralls
Copy link

coveralls commented Nov 11, 2023

Coverage Status

coverage: 99.463%. remained the same
when pulling 265e97d on shicks:patch-1
into 08ff289 on preactjs:main.

@JoviDeCroock JoviDeCroock merged commit 1cc7698 into preactjs:main Nov 11, 2023
2 checks passed
This was referenced Nov 11, 2023
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

3 participants