Replace axios with a simple custom fetch wrapper

mariuz 15 points 3 comments April 01, 2026
kentcdodds.com · View on Hacker News

Discussion Highlights (2 comments)

joeframbach

In the case of authentication redirect, any inflight request is going to fail and you're about to navigate in a few milliseconds, so I don't resolve those promises. Return new Promise(() => {}).

pheew

I’m all for replacing as much 3rd party libs with stdlib but it’s hard to look past the storing of the jwt in localStorage. Please don’t do that people. It’s very easily extracted through xss attacks.

Semantic search powered by Rivestack pgvector
3,471 stories · 32,344 chunks indexed