Open b3nten opened 1 year ago
Reproduction: https://github.com/B3nten/ultra/tree/async-debug
Steps: 1) Run deno task dev, chose 18 (with-react-router). 2) Note console output on full refresh of pages Home and About 3) Note difference in output on subsequent refreshes of About
useAsync calls inside of dynamically imported components push the callback into the dataStream context after the stream has finished. This means that they don't stream to the client. This only occurs the first time the server renders a page. Subsequent requests work as intended.
Here is a github repo that demonstrates this. https://github.com/B3nten/useAsync-repro
I currently have no idea why it works okay on subsequent requests, but as it does so I think it should be possible to fix.