by dccoolgai · 11y ago · 0 comments
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
So before proxies, we used to do it as:
await server.rpc.run("methodName", [argumentOne, argumentTwo])
Now, we just do: await server.rpc.methodName(one, two)
The proxy traps that method call and returns a promise that runs that on the server. It's very slick and has made our code a lot more readable.IMHO, it would be much more useful if it were synchronous.