salesforce / lwc

⚡️ LWC - A Blazing Fast, Enterprise-Grade Web Components Foundation
https://lwc.dev
Other
1.61k stars 395 forks source link

Asynchronous rendering and @wire #908

Open priandsf opened 5 years ago

priandsf commented 5 years ago

SSR The @wire mechanism should be extended to notify the asynchronous rendering engine that the data is available. It should resolve a Promise, or a join of Promises if there are multiple @wire and even a Promise provided programmatically by the developer.

caridy commented 5 years ago

Yes, this has always be in our radar. The first stop here is to make sure that https://github.com/salesforce/lwc/pull/899 supports that use-case, even if that's only for the SSR for now. @davidturissini I think we can allow a service to store the promise in the context somehow, and then on the server side the engine can rely on that promise to render that shadow then the promise resolves.