Repository navigation
Replace component context with with / provide. - #843
Draft
gdotdesign wants to merge 5 commits into
Draft
gdotdesign wants to merge 5 commits into
gdotdesign wants to merge 5 commits into
Conversation
gdotdesign
marked this pull request as draft
November 27, 2026 14:15
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replace component context with
with/provideAdds dependency injection that is checked at compile time. It replaces the component
context/providemembers (breaking).How it works
with name : Type { ... }reads a value in any function.with name : Typeas a component member reads it in the whole component.provide { name: value, ... } { ... }provides values to everything called or rendered inside it.childrenand otherHtmlproperties).Rules
withinside that newprovideis an error (with_shadowed).ref.fn()uses the component's own values unless a value is provided around the call. A value of a different type there is an error.Also in this PR
|>now get the pipe as their parent. Before, awithread inside a pipe was reported as not provided.contextmembers, theprovidecomponent member,contextdefaults on types, andcreateContext/useContextfrom the runtime.