Or in other words, why you should hard-code sequence numbers, and not generate them programmatically.
Unlike .jsx
files, .razor
/.cshtml
files are always compiled. This is potentially a great advantage for .razor
, because we can use the compile step to inject information that makes things better or faster at runtime.
A key example of this are sequence numbers. These indicate to the runtime which outputs came from which distinct and ordered lines of code. The runtime uses this information to generate efficient tree diffs in linear time, which is far faster than is normally possible for a general tree diff algorithm.