Open priandsf opened 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.
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.