Live Chat Icon For mobile
Live Chat Icon

When does the StateHasChanged method call automatically?

Platform: Blazor| Category: General

The StateHasChanged method is called whenever a bound property is changed or a UI event triggered for an instance. This notifies the Blazor that the component should rerender it.

For example, when a button is clicked in the index page, the index component rerenders (no need to call StateHasChanged) because the button’s parent is an index; but when it has a child component it has be notified to render as the parent has changed.

Share with

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.