DEV Community

Discussion on: Progressive Enhancement in Django vs Remix

Collapse
 
zachtylr21 profile image
Zach Taylor

I'm not sure what you mean. We did use a React SPA consuming APIs powered by Django. But I'm saying that a React SPA is not always the best choice, because you lose out on a lot of the benefits of server-side rendering. It's unfortunate that in our situation, we had to completely ditch SSR for a React SPA. In many situations, I'd rather have a server-rendered site and client-side JS, which you can do with Django templates, but it often results in really messy JavaScript code. There's just not a straightforward way to write and maintain lots of JS in Django. Remix, on the other hand, allows you to start with SSR, then incrementally add JS as you need it in a really seamless way.

Collapse
 
arthtyagi profile image
Arth

Hey! Thanks for replying. I know that you lose on SSR but since you mentioned you were developing an “enterprise app”, I assumed speed was a more important factor than SSR as with any “app” (I still strongly encourage SSR for websites tho).

Now I know Remix is great but since you already had a functioning SPA, I’m just trying to understand whether the switch was exclusively because of speed OR SSR. If it was because you just wanted SSR, I understand.

However, for speed, I think an SPA can be super fast these days using the right tools. Like I said earlier, leverage the Cloudflare CDN for React, load balance dockerized Django backend on AWS EKS/ECB and make sure to use Vite instead of CRA/webpack-powered configs for your React app. (Even Remix ditches Webpack, I believe).