@kettanaito This feels like too much, it could be simpler and more understandable to just say:
In the POST /posts handler, read the request body and add our new post.
Then the reader can fill in the blanks by reading the code snippet (which is excellent).
@kettanaito As someone who isn’t a beginner to msw, but had to integrate again in a greenfield project:
1. The docs have too much branching. From getting started, Step 2 branches to 2 other pages, step 3 branches to 3 more (and which one do I click, browser or Node.js, if I’m using Next.js)
@kettanaito Some sentences could be simplified, for example:
In the POST /posts handler, let’s read the request body and push the new post to the allPosts map. We can get the reference to the intercepted request instance as the request argument to the response resolver function.
@kettanaito 2. Basics and Concepts on the sidebar feel overwhelming. Couldn’t they have been simply “Request” and “Response”
3. Or couldn’t they have been merged into the REST and GraphQL instead?
4. “Describing REST API” isn’t very beginner friendly, could it have been “Usage with REST API”
@tibudiyanto I was listening for 30 mins, wondering why he sounds so familiar, did something else, saw your tweet, got back to the video and now I can’t unhear 🤣
@feedthejim Make middleware less weird, it has lots of runtime issues compared to gSSP/RSC. Add blessed way to pass data from middleware. Add blessed way to run middleware only on hard navigation.
ceweku kediagnosa kanker stage 4 di awal juni.
belum selesai sedih, capek ngerawat dan ngurusin rumah sakit, tiba-tiba aku harus berhadapan dengan besarnya biaya RS. ratusan juta rupiah sekali chemo cycle.
it has been devastating. mentally, physically, financially
@swyxio Grossness aside, it actually is a pain for npm packages. We had to retool our design systems and other shared libs due to “use client” being placed in the middle of the file when compiled.
@kettanaito Yeah we’ve been referring to that link. And I believe client setup also requires useEffect (which wasn’t previously required). Thanks for the package btw, gamechanger.
@turfaul@musuhphp Kurang tau jg detailnya mas, contoh saya di atas hanya general idea aja. Sekilas cek HTTP status codes ga nemu sih yg cocok untuk “I handled it, but here’s the best error I can tell you”
@t3dotgg@kenwheeler App router blocker where I work:
1. msw doesn’t work
Inconvenience:
2. Npm package that uses React (v18) cache doesn’t work, needs workaround (due to Next.js consuming project having different React version, canary)