Maïeul
TTCTheo's Typesafe Cult
•Created by fabb on 11/12/2023 in #questions
Downsides to Qwik?
I think it's not something people worry about until they encounter an actual serialization error. We haven't had any as part of our qwik-ui work, and although we are quite some performance nerds that are quite careful about eager execution, we haven't ever been worried about potential serialization issues to my knowledge.
15 replies
TTCTheo's Typesafe Cult
•Created by fabb on 11/12/2023 in #questions
Downsides to Qwik?
Also on waterfalls, I haven't heard of many issues. Maybe it's only in dev mode: https://qwik.builder.io/docs/faq/#does-qwik-generate-too-many-small-files
I'd take a look at the FAQ if you want to know more.
15 replies
TTCTheo's Typesafe Cult
•Created by fabb on 11/12/2023 in #questions
Downsides to Qwik?
Other than that, the DX is so much better than Next (thanks to signals and auto-lazy loading).
I haven't had issues with serialization, but I know a few people have. Qwik has
noSerialize()
for that kind of situations (https://qwik.builder.io/docs/components/state/#noserialize), which seem to be pretty rare.15 replies
TTCTheo's Typesafe Cult
•Created by fabb on 11/12/2023 in #questions
Downsides to Qwik?
Cons:
Qwik lacks an equivalent to shadcn. Hence why I'm working on qwik-ui (= Radix) and qwikcn (= shadcn) 😛. But you can still use stuff like daisy-ui or bootstrap if you don't care.
Room for improvement:
- <Link prefetch> isn't very well implemented for mobile. It will prefetch on hover on desktop, but we need to fix mobile. This is potentially fixed by Qwik Insights (but I haven't test it yet).
- It's not possible to lazy-load inside a component since it messes up with the optimizer (that's creating to lazy-load boundaries for you). You usually don't need to though, since the optimizer creates performant lazy-load boundaries for you. But if you need to import many files without writing the imports manually, you can work-around it with import.meta.glob, but it has some rough edges too (docs on that in my PR https://github.com/BuilderIO/qwik/commit/9784ec148b53241ecc8a0599658f8365b1990e28)
- we're currently fixing an issue with vite's library mode that creates some unoptimzed bundling. (this is a concern for library maintainers only and if the lib wants to provide multiple components from the same package).
15 replies
TTCTheo's Typesafe Cult
•Created by fabb on 11/12/2023 in #questions
Downsides to Qwik?
Pros:
To me the greatest pro of Qwik is that it can lazy-load js bundles automatically by default. This is done in the background (not on the main thread) through the service workers that store the bundles into the browser cache so that they can be retrieved and executed immediately on click. That may sound like nothing, but it means almost 100 lighthouse scores by default at any scale, which means you don't have to manually handle your lazy-loading or deal with the RSC mental model where you need to constantly worry about what's client, what's server, and what's shared.
Then of course, you have signals, which can be a big perf boost in some/many situations.
One underrated feature is
qwikify$
which basically gives you access to any library that's available in React (and Angular; Vue, Svelte and Solid are WIP). This means you can use "react three fiber" in Qwik for example. Your 3D scene would then be loaded as an island (similar to Astro). So in a way Qwik's ecosystem isn't actually that small.15 replies
TTCTheo's Typesafe Cult
•Created by fabb on 11/12/2023 in #questions
Downsides to Qwik?
Hey, I've been working on the 𝕏 stack (using Qwik) for the past 6 months and I think I may have some insights on it. I'm also a Qwik and qwik-ui (equivalent to radix) contributor.
15 replies
tRPC + App directory + SSR - current state?
I feel like RSC and server actions (next 13), Remix loaders/actions and Qwik loaders/actions already solve the main problem trpc was solving in the first place. But I may have overlooked this. Do you see interesting benefits to using trpc with RSC (now or in the future)?
11 replies
TTCTheo's Typesafe Cult
•Created by Maïeul on 3/17/2023 in #questions
Auth: which solution for which situation
Totally agree on that
21 replies
TTCTheo's Typesafe Cult
•Created by Maïeul on 3/17/2023 in #questions
Auth: which solution for which situation
But yeah, handling auth yourself is totally like reinventing the wheel
21 replies
TTCTheo's Typesafe Cult
•Created by Maïeul on 3/17/2023 in #questions
Auth: which solution for which situation
Thanks! I didn't think I'd write so much in the first place 😅
21 replies
TTCTheo's Typesafe Cult
•Created by Maïeul on 3/17/2023 in #questions
Auth: which solution for which situation
Other solutions: when you have time or money to waste?
I looked into Auth0 a few years ago but found it very expensive and not so easy to implement. I hope it has improved a little since then. I looked into passport.js as well but never managed to set up the jwt strategy, which is what I wanted, and the other strategies didn’t seem much easier to implement. I also quickly looked into Keycloack, but couldn’t wrap my head around it. And I tried rolling out my own solution too, with jwt sessions, and it was just not secure. Please don't do that, it is a huge waste of time.
21 replies
TTCTheo's Typesafe Cult
•Created by Maïeul on 3/17/2023 in #questions
Auth: which solution for which situation
Supabase: when you need basic open-source auth that can scale and more control
Supabase Auth is just like Firebase, the advantage being that you have more control over your database and how they are stored, the disadvantage being that, even though it is not too too expensive, it is not free: $0,00325 per MAU or $325 per 100,000 MAU. Personally, I don’t see much benefits over Firebase, unless you need their Row Level Security (RLS) policies.
21 replies
TTCTheo's Typesafe Cult
•Created by Maïeul on 3/17/2023 in #questions
Auth: which solution for which situation
Firebase: when you need basic auth that can scale for free
If you just need basic Auth with email/password, magic links, Oauth providers, or SMS, Firebase is easy enough to set up and because it’s free for these features (except for SMS but it always costs), I would pick it for most projects that have the potential to reach millions of users. But if you need better User Management, you can upgrade firebase auth with the identity platform, but this cost around 0.0025 to 0.0050 (see: https://cloud.google.com/identity-platform/pricing) per MAU depending on the number of users you have, and this can be expensive too. Another gotcha is that Firebase is proprietary and backed by Google, so you can’t use it in some countries (e.g. China), and you will have to use another solution in conjunction. But for China, you must store your data in Chinese territory anyway, so other solutions won’t help much. Thankfully, you can always extract your users from Firebase if you need to switch to another solution later. It can be hard to migrate passwords though, and this is why I tend to favor magic links over email/password sign-ins (this is what Next-Auth/Auth.js recommends by the way).
21 replies
TTCTheo's Typesafe Cult
•Created by Maïeul on 3/17/2023 in #questions
Auth: which solution for which situation
Clerk: when you want the easiest setup and don’t expect too many users
Though I haven't tried it out, I'm sure Clerk is super easy to implement from what I've seen, and it seems powerful too for User management. The only gotcha for me, and it's a big one, is the price. I think it's less expensive than Auth0, but still, $0.02 for each MAU is very expensive if you have tens of thousands of users and you want your app to be free for your end users. I would probably consider Clerk to build a B2B application, where I wouldn't expect too many users, and where I would need extensive features for user management.
21 replies
TTCTheo's Typesafe Cult
•Created by Maïeul on 3/17/2023 in #questions
Auth: which solution for which situation
Next-Auth/Auth.js: when you need complete control at any scale, but at which cost?
I think it can be good when you want total control over your Auth mechanisms. But I don't trust myself enough to understand Auth sufficiently in order to set this up well enough in order for my Auth system to be scalable and secure, and I think other developers should be wary of that too. I personally have had problems in the past with setting up custom claims for access management (roles), and I couldn't set up JWT auth securely. I'm sure Next-Auth/Auth.js can fix these issues and simplify the process eventually, but my take is that you need to understand what you're doing in order to use it properly, or you will spend a lot of time trying to figure it out yourself without knowing for sure that you're not doing anything wrong.
21 replies
TTCTheo's Typesafe Cult
•Created by Maïeul on 3/17/2023 in #questions
Auth: which solution for which situation
I am not an Auth expert but I have my share of experience since I have tried implementing each of the aforementioned solutions in the past, except for Clerk, but here's my take:
21 replies
TTCTheo's Typesafe Cult
•Created by Maïeul on 11/23/2022 in #questions
Know of any alternatives to tailwindUI?
great resources thanks
36 replies
TTCTheo's Typesafe Cult
•Created by Maïeul on 11/23/2022 in #questions
Know of any alternatives to tailwindUI?
It's much clearer now thanks to the video
36 replies