Apostolos Tsakpinis
Apostolos Tsakpinis
Something's going on with `html-webpack-plugin`. I've never used it before but looking into it.
In the meantime, I strongly suggest switching to https://github.com/pmmmwh/react-refresh-webpack-plugin It is the "official" react refresh plugin and it looks to be working with html-webpack-plugin without issues. It also now has...
Hi @AlexLup06, The problem is with your client component. Async components are only supported on the server. If you remove the `async` keyword from `Fact` it should work fine. You...
Hi @AlexLup06, This is an obvious bug in the docs. I left a comment. Per React's RFC, async is only reserved for server components: https://github.com/acdlite/rfcs/blob/first-class-promises/text/0000-first-class-support-for-promises.md#usepromise
@AlexLup06 regarding the infinite calling of fetch, based on the RFC again, the promise passed to use() is supposed to be cached (stable identity between renders). There is a `cache()`...
@balazsorban44 > I also scanned the docs, and cannot find where we document `async` client components, if someone can link me to it, I can make sure we fix it!...
@palmer-cl every time React calls your render function, the `getData()` inside `use()` returns a new Promise. It's not the same Promise that the one that got used to Suspend originally....
@palmer-cl `cache()` takes a function declaration as the only argument. You are not supposed to call it inside render. See the commented code in my example: https://codesandbox.io/s/next-appdir-use-i43p25?file=/app/fact.tsx Try this: ```js...
@ShravanSunder are you on `v13.0.2`?
@AlexLup06 should work fine with anything from 18.2.0 and above or with `react@next`, `react@experimental`. I made a separate sandbox to test `cache()` https://codesandbox.io/s/next-appdir-use-cache-xksk50?file=/app/fact.tsx You'll notice that it works correctly. It...