Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make
useOnMountEffect
accept functions with void return types (#2089)
## Summary: Previously, `useOnMountEffect` accepted functions that either return a cleanup function or explicitly return undefined. This means that functions with no return value (e.g. `() => {}`) result in errors, even though they're accepted by `useEffect`. This PR updates the argument type so that it accepts functions with void returns. Minor version bump because the API changed, but it is non-breaking. ## Test plan: N/A Author: timmcca-be Reviewers: kevinbarabash Required Reviewers: Approved By: kevinbarabash Checks: ✅ codecov/project, ✅ Chromatic - Get results on regular PRs (ubuntu-latest, 16.x), ✅ Test (ubuntu-latest, 16.x, 2/2), ✅ Check build sizes (ubuntu-latest, 16.x), ✅ Lint (ubuntu-latest, 16.x), ✅ Test (ubuntu-latest, 16.x, 1/2), ✅ Chromatic - Build on regular PRs / chromatic (ubuntu-latest, 16.x), ✅ Publish npm snapshot (ubuntu-latest, 16.x), ⏭ Chromatic - Skip on Release PR (changesets), ✅ Prime node_modules cache for primary configuration (ubuntu-latest, 16.x), ✅ Check for .changeset entries for all changed files (ubuntu-latest, 16.x), ⏭ dependabot, ✅ gerald Pull Request URL: #2089
- Loading branch information