I am rendering a Blazor component in a HTML document from JavaScript. It is working 100% but once my Blazor component has rendered, I can not update one of the component parameters. This example is in the .Net 6 RC1 spec. I would appreciate some help on two way binding of a parameter.
Code in my HTML file:
<script>
async function loadComponent() {
let containerElement = document.getElementById('my-counter');
await Blazor.rootComponents.add(
containerElement,
'counter', { currentCount: count });
};
</script>
I want to update "Count" after the component is rendered.
See here for the Microsoft .Net6 RC1 notes.
I have only an idea for one way (blazor->JS).
You could define a JS-function that increment the counter and call it with blazor.