herbertsmith
herbertsmith
TTCTheo's Typesafe Cult
Created by SiiR on 8/19/2023 in #questions
Signup & Next Auth
This was a fantastic read, thank you for your insights
146 replies
TTCTheo's Typesafe Cult
Created by Mugetsu on 7/12/2023 in #questions
NextJs 13 app folder - SPA
I don't think this is a great idea to make an SPA app using app directory api. Since you'd have to put "use client" at the beginning of each file. Which is tedious. In my opinon better approach would be to just use the pages api instead. To elaborate everything in app directory is SSR (server side rendered) by default, if you want to make component/page reactive you need to put "use client" at the beginning of the file. This allows you to use hooks in the component. Other approach would be to just make some of the app server rendered and the rest rendered on the client. Which, in my opinion, is the best approach. If you choose to use pages api the best way to migrate it would be create-t3-app, but something tells me you already know that. DISCLAIMER: I did not use app directory a lot and I could be entirely wrong. You should investigate on your by reading the docs. https://nextjs.org/docs
5 replies
TTCTheo's Typesafe Cult
Created by ja_iy on 6/21/2023 in #questions
How to implement different not-found pages for diffrent routes in next js app dir
From the little research I've done it's not really possible. Next allows you to add a custom 404 page in your root app directory but that is really it. This would be a great addition imo. One resolution to this problem is like you said, creating a custom page that the user will be redirected to if he tries to access something in a route group that does not exist. If you find some more satisfactory solution I'd love to hear how you've done it.
3 replies
TTCTheo's Typesafe Cult
Created by General Mudkipp on 6/16/2023 in #questions
Good learning resources?
I hope I helped, remember you never stop learning.
20 replies
TTCTheo's Typesafe Cult
Created by General Mudkipp on 6/16/2023 in #questions
Good learning resources?
I also found a great article listing a lot of resources for React, about tooling for it, and answers for most common problems. https://dev.to/theme_selection/ultimate-reactjs-resources-for-web-developers-2021-424c?utm_source=pocket_saves
20 replies
TTCTheo's Typesafe Cult
Created by General Mudkipp on 6/16/2023 in #questions
Good learning resources?
Doubting your skills is a normal think imo, so you shouldn't worry much about you don't knowing what to do since everyone doesn't know what to do, most of the times.
20 replies
TTCTheo's Typesafe Cult
Created by General Mudkipp on 6/16/2023 in #questions
Good learning resources?
Other than that it's just rinse and repeat. You want to create a feature, think about it do a little bit of research, introduce it, refactor it, so on and so forth. Do it enough times and you will have a lot of knowledge and tools in your toolbelt ready to use at any time.
20 replies
TTCTheo's Typesafe Cult
Created by General Mudkipp on 6/16/2023 in #questions
Good learning resources?
In case of Typescript "Typescript Handbook" is also awesome place to start. https://www.typescriptlang.org/docs/handbook/intro.html
20 replies
TTCTheo's Typesafe Cult
Created by General Mudkipp on 6/16/2023 in #questions
Good learning resources?
Don't know if it will help much but have you tried new official React docs? They were revamped pretty recently and they've been updated with a lot of examples, pitfalls, and good practices. In my opinion this is the best first place to get to know React in depth. Theo even made a video a while back about React docs beeing updated. (can't find the video atm but I'm pretty sure that this video exists) https://react.dev/
20 replies