I've just come to the realization that the developer most likely inquired ChatGPT to write examples for "Modern React" implementations and just went with it.
And yet you claim that you have a "deep understanding" of how React works. Why did you ask an idiotic LLM then? Doing it yourself would have allowed you to be even more dishonest with your examples... :>