feat(context): support provider props in MultiProvider - #1015
feat(context): support provider props in MultiProvider#1015yhuikzdtguioaert wants to merge 1 commit into
Conversation
🦋 Changeset detectedLatest commit: f4864d5 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
Included review availability: Your plan includes up to 4 reviews per rolling hour; 3 remain after this review. 📝 WalkthroughWalkthrough
ChangesContext provider props
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to The PR adds provider-prop support while preserving existing context value behavior; no actionable merge-blocking risk remains beyond normal checks and review. Sequence Diagram(s)sequenceDiagram
participant MultiProvider
participant CreatedContextProvider
participant ContextConsumer
MultiProvider->>CreatedContextProvider: Pass provider props and generated children
CreatedContextProvider->>ContextConsumer: Provide created context
MultiProvider->>ContextConsumer: Pass context values through Provider.value
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Closes #755
What changed
createContextProviderand pass the tuple's second item as provider propsvaluesemantics for Solid contexts and context provider components, including object valuesmergePropsThis targets
main. Thenextbranch uses the divergent Solid 2 context API, so I can port the accepted approach there separately.Testing
pnpm --filter @solid-primitives/context test -- --runpnpm --filter @solid-primitives/context test:ssr -- --runpnpm --filter @solid-primitives/context buildpnpm lintpnpm testCodex assisted with repository exploration, implementation, tests, and validation. I reviewed the resulting behavior and diff.
Summary by CodeRabbit
New Features
MultiProvidernow supports passing arbitrary props to providers created withcreateContextProvider.Documentation
MultiProvider.Tests