Q： Since Max uses 'ref' as the key to identify a tag, i guess maybe it's similar with the 'id' in html ?
A： Not really. "id" doesn't give you any access to the element - ref does though. With ref, you get a reference that allows you to directly work on the underlying DOM element from within your JS code.
With "id", you could get that access via getElementById and then it would be equivalent but ref doesn't need that extra step.