Get the latest tech news
React for Two Computers
Two things, one origin.
For example, a typical React component combines some imperative recipes (like sequences of function calls in the event handlers) with some declarative blueprints (like the returned JSX tags). Imagine that TypeScript would not only let you click into them now, but it would also be aware that these functions are behind a remote boundary, so it would force them to be declared as async, and ensure that the types of their inputs and their output remain serializable (and thus can actually travel over the network). In the simplest possible case, if all of the code destined for the Late world were ultimately assembled into a giant single file that gets sent to the other computer over the wire, this identifier could just be the referenced function’s global name:
Or read this on Hacker News