MSW intercept for fetch of next.js 13 app dir server component #1498
-
Currently I'm trying to mock the api response for data fetching with react server component (next.js 13 app dir), page.tsx (server component)
|
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 8 replies
-
Hi. We don't support the Next 13 App directory at the moment. The App directory itself is in beta and we won't be supporting it until it's stable. Next has removed the |
Beta Was this translation helpful? Give feedback.
-
Given that the current version is already stable, is there any plan or decision about whether there will be an update? |
Beta Was this translation helpful? Give feedback.
-
Also interested in if there is any movement on this? Fully understand the team at vercel need to get involved. For anyone looking for a temporary solution - we've setup a basic express server that acts as a mock server. It's not perfect, but works well for now! |
Beta Was this translation helpful? Give feedback.
-
Hi. Thanks for reporting this. Please see #1644 and let's use that issue for any related discussions. Thanks. |
Beta Was this translation helpful? Give feedback.
Hi. We don't support the Next 13 App directory at the moment. The App directory itself is in beta and we won't be supporting it until it's stable.
Next has removed the
_app.js
API for us to instantiate MSW, so we would have to find a different approach. I had some luck with integrating MSW using React Server Components but there are a few challenges in regards to how Next works internally that prevent us from moving forward.