If you're worried about having to sue Facebook, nothing stops Facebook from hitting you with patents covering Preact. However the patent grant does prevent them from hitting you with patents covering React if you use React and aren't suing over your own patents that cover React. You're even allowed to countersue them if they sue you first (again, as long as you don't countersue over React).
IOW if you're concerned about Facebook patents:
Preact: no protection
Angular, Vue, Ember: no protection
React: full protection as long as you don't sue them first and don't countersue over React patents
Unless you have inside knowledge of FB's full patent arsenal, using ANY code written by ANYONE puts you at risk of being sued. The only difference with React is that you actually know they can't sue you over that specifically.
Is this correct? The way I read it, it concerned any software patent
> The license granted hereunder will terminate [..] if you [..] initiate [..] any Patent Assertion: (i) against Facebook or any of its subsidiaries or corporate affiliates
> [..] Notwithstanding the foregoing, if Facebook [..] files a lawsuit alleging patent infringement against you in the first instance, and you respond by filing a patent infringement counterclaim in that lawsuit against that party that is unrelated to the Software, the license granted hereunder will not terminate under section (i) of this paragraph due to such counterclaim.
https://github.com/facebook/react/blob/master/PATENTS
In other words: if Facebook sues you (and it can't be about React if you use FB's React with the grant) and you countersue, the grant will ONLY terminate if the patents you use concern React.
So you can still defend yourself as long as you don't attack React.
EDIT: FWIW (ii) and (iii) are basically scenarios where you sue other people over using React, so those aren't really relevant when trying to countersue Facebook.
I don't think a general agreement to prevent any kind of lawsuit is completely legal and acceptable in a court of law.