Help ! Aurelia ssr

I’ve create a simple example, I want the ssr to render a page just after the result return from an API :
It base on this code

I put this code on activate:

    async activate(): Promise<void> {
      return new Promise((res, rej) => {
          .then(data => data.json())
          .then((json) => {
          .catch((error) => rej(error));

how can I make ssr wait to response from api and base on the response rerender the page ?

not related to the question, but I have to add a comment…
why do you warp the fetch call with a Promise? the fetch itself returns a Promise.

I found my self confuse too with this syntax but this code was taken from their skeleton for ssr demo, so I try to implement a real call to api and how it’s react to this. but as u understand, without success

hi @phantom, the lifecycle hook activate is called from aurelia-router when the component is loaded, if this component is not the entry page but instead a custom element, try the attached or bind lifecycle hook instead. if you are still having trouble, please post more code/example repo.