79471394

Date: 2025-02-27 01:11:35
Score: 2.5
Natty:
Report link

There's a much easier way to do this. If you add an @key attribute, Blazor will know that when the key value has changed, it needs to remove the old DOM element and insert a new for the new URL. So all you'd need here is this:

<video @key="currentVideoUrl" id="videoTagId" autoplay width="1080" height="720">

Reasons:
  • No code block (0.5):
  • User mentioned (1): @key
  • Low reputation (1):
Posted by: Jonathan Grimm