Not able to stub or mock public cascading param with private get accessor of blazor component #457
Unanswered
Purendra-naik-ascendlearning-com
asked this question in
Q&A
Replies: 1 comment 2 replies
-
@egil Could you please help me on above issue? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
[CascadingParameter]
public IType State { private get; init; }
var component1 = ctx.RenderComponent(ComponentParameter.CreateCascadingValue("State", value)); // not working
var component2 = ctx.RenderComponent(CascadingValue("State", value)); // not working
var component = ctx.RenderComponent(parameters => parameters
.Add(p => p.State, value)
); // Not able to access p.State as it is protected
Beta Was this translation helpful? Give feedback.
All reactions