is Astro SPA a good idea?
Okay the plan is this (say we are making a dashboard or some other form of web apps, ignoring SEO stuff):
- Create an astro project
- have only a [...app].astro file in the routing, which contain an <App/> react component
- handle everything else inside <App /> like a classic React SPA app
It's probably not the type of things astro was built for, but what are the actual downsides of this I can expect versus other ways of making the same app (say t3 stack for e.g.)?
38 Replies
its a bad idea
astro is more for a static html, to the point of shipping 0 js by default
i know that its not what astro is for, and that i won't benefit from what astro provide by doing this
but what astro provides isnt really an issue for an SPA so I don't really miss it (like having a dashboard ship 0 js is pretty low on my priority list)
I have a hunch that it prob is a bad idea, but im having trouble coming up with what the actual downside is, hence why I made the question
the ideia of astro is to be a lightweight with 0 js
spa is the total opposite
you need auth and bunch more of stuff
auth is a good one, since ive only been using next-auth for that
what do non-metaframework react user use for auth anyway?
next auth is fine
can you use next-auth outside of nextjs?
you can use something from a provider such as auth0 as well
next auth is more a convenient tool to authentication
itself doesnt manage identities and such
if you try to use email and password with next auth
"The functionality provided for credentials based authentication is intentionally limited to discourage use of passwords due to the inherent security risks associated with them and the additional complexity associated with supporting usernames and passwords."
ye i used next auth so i know what it does
and ye it is convenient, and thus if there's nothing equivalent in the hacky stack i described to handle auth then its obv a DX downside
im not the biggest fan of next auth
but it works well
same
but atm its the best option in next i think
if you dont want to pay
yes
you have some auth providers to use
like clerk
auth0
but if auth is the only thing holding what i described from being a reality its prob not that far off?