-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Closed
Labels
✔️ Resolution: AnsweredResolved because the question asked by the original author has been answered.Resolved because the question asked by the original author has been answered.Status: Resolvedarea-blazorIncludes: Blazor, Razor ComponentsIncludes: Blazor, Razor Componentsquestion
Description
@AndreiGorlov thanks for contacting us.
This is by design, CascadingParameters and other form of parameters (which PersistentComponentState is a form of) must be public properties.
Originally posted by @javiercn in #63268
Property marked with [CascadingParameter] does not have to be public. Attribute works fine with private/protected properties.
[PersistentState], on the other hand, applicable to public props only. What is the rationale behind this design?
I just want to persist component state. Why do I have to expose it?
Metadata
Metadata
Assignees
Labels
✔️ Resolution: AnsweredResolved because the question asked by the original author has been answered.Resolved because the question asked by the original author has been answered.Status: Resolvedarea-blazorIncludes: Blazor, Razor ComponentsIncludes: Blazor, Razor Componentsquestion