Why I use a backend for frontend (BFF) for most SPAs I build: ✅ Better security
Why I use a backend for frontend (BFF) for most SPAs I build:
✅ Better security. The BFF can set an HTTP-only cookie.
✅ Better performance. I can aggregate calls. And, I can return exactly the JSON the UI needs. This reduces HTTP payloads and simplifies the frontend.