Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

283
Views
Render Blazor components from JavaScript - How to Update a Blazor component parameter from JavaScript after component render

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.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

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.

calling a JS fcuntion

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!