@page "/"
<FooComponent @ref="FooComponentRef" FooParameter="@MyValue"/>
<button @onclick="Test">@MyValue</button>
@code {
FooComponent FooComponentRef { get; set; }
string MyValue { get; set; } ="SomeValue";
int count { get; set; }
void Test(){
MyValue = "SomeValue" + count++;
FooComponentRef.SetFooAndFooFun(MyValue);
}
}