Closed
Description
When adding @onmousemove=MouseHasMoved
to an element Blazor will re-render the component every time the MouseHasMoved
method finishes executing.
Preventing this using ShouldRender
is tricky, because the component might need to render for other reasons, and having to set some state for every scenario that causes a re-render is labourious.
Could we have a way of telling Blazor not to add a call to StateHasChanged. Perhaps something like this
@onmousemove:preventStateHasChanged
@onmousemove:preventStateHasChanged=true
@onmousemove:preventStateHasChanged=LeftMouseButtonIsHeldDown