It doesn’t matter whether you use React on desktop or Raspberry PI. You may run React on any devices irrespective of online or offline. Raspberry PI being a microprocessor, much like a micro PC, running on Linux or Windows OS, you are free to do whatever you wish.
Here’s an example of using Pi in a “Realtime embedded programming”
By embedded, you don’t have to get confused with assembly level or chip level programming, Pi with accessories are meant to build a truly embedded systems.