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

Explicitly add children to provider props #4566

Merged
merged 3 commits into from
May 11, 2022
Merged

Explicitly add children to provider props #4566

merged 3 commits into from
May 11, 2022

Conversation

takameyer
Copy link
Contributor

@takameyer takameyer commented May 10, 2022

What, How & Why?

Explicitly add children to provider props, as they have been removed in React 18 from React.FC.
More reading on this https://solverfox.dev/writing/no-implicit-children/

This closes #4565

☑️ ToDos

  • 📝 Changelog entry
  • 📝 Compatibility label is updated or copied from previous entry
  • 🚦 Tests
  • 🔀 Executed flexible sync tests locally if modifying flexible sync
  • 📱 Check the React Native/other sample apps work if necessary
  • 📝 Public documentation PR created or is not necessary
  • 💥 Breaking label has been applied or is not necessary

If this PR adds or changes public API's:

  • typescript definitions file is updated
  • jsdoc files updated
  • Chrome debug API is updated if API is available on React Native

@kraenhansen
Copy link
Member

kraenhansen commented May 11, 2022

It seems you have a test failing from this: RealmProvider.test.tsx#L114 .. you could consider making the children optional.

@takameyer
Copy link
Contributor Author

There will never be a use case for the providers to not have children. I'll reflect this in the failing test.

@takameyer takameyer merged commit d3540ad into master May 11, 2022
@takameyer takameyer deleted the andrew/fix-4565 branch May 11, 2022 09:16
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

(Realm React) Children prop missing on RealmProvider component
2 participants