benjamn / optimism

Composable reactive caching with efficient invalidation.
MIT License
114 stars 19 forks source link

Re-export `Slot` so consumers need not import it from `@wry/context` #613

Closed benjamn closed 11 months ago

benjamn commented 1 year ago

Because Apollo Client uses the Slot constructor directly here, it needs to have a direct dependency on the @wry/context package in addition to depending on optimism, which has caused dependency version mismatches leading to duplicate installs of @wry/context, which can cause problems with some bundlers.

Instead, when you're already using optimism, you might as well import the same version of Slot that it uses, which is what this PR enables.