-
-
Save ShopifyEng/05c1a47b3b69ed833fe4a3fc99a009b7 to your computer and use it in GitHub Desktop.
Remote Rendering: Shopify’s Take on Extensible UI - Making remote procedure calls using `endpoint.expose` and `endpoint.call`
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { createEndpoint } from '@remote-ui/rpc'; | |
const worker = new Worker('./script2.js'); | |
const endpoint = createEndpoint(worker); | |
endpoint.call.theAnswer().then((value) => { | |
console.log(value); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment