You’re (generally) correct that patents are case-specific. You would need to consider each patent individually to determine if it was relevant to React, VUE, etc. Some of FB’s patents may be relevant to both React and VUE, others only relevant to React (not VUE), etc.
Re: patents and software, you’re correct that patents aren’t (usually) derived from the code itself. The technology/feature is often described in terms of the operations/algorithm being performed (unrelated to the specific code/language being used).
The “React patents” referenced in FB’s React patent license refers to patents FB owns that that cover features in React. Again, these patents may (or may not) also be relevant to VUE, etc.