JustATempest
JustATempest
Explore posts from servers
TTCTheo's Typesafe Cult
Created by RevengeTime on 7/31/2023 in #questions
Third party authenticator
You would create a user table in your backend. With an external ID column. You create an API endpoint that will listen to the user created web hook event. You'll then create the user when a new users created.
4 replies
TTCTheo's Typesafe Cult
Created by RevengeTime on 7/31/2023 in #questions
Third party authenticator
When a user is created in clerk. An event is created and you can create wehhooks to sync your back end with clerk users.
4 replies
TTCTheo's Typesafe Cult
Created by meeepsss on 7/25/2023 in #questions
bloody confused by the new Next.js server actions
@meeepsss The reason why you can't find anything about server actions implementation It's because they're built a top react actions, which is an experimental react feature. This might be a better search query.
8 replies
TTCTheo's Typesafe Cult
Created by locusdagraca on 7/25/2023 in #questions
fetching dynamic data in layout, not page
While you can make the layout a client component, from my experience, I would recommend making layouts server components, and client components as the last resort. Ideally, with the features the app router gives, a lot of the advantages are lost by making the layout a client component.
5 replies
TTCTheo's Typesafe Cult
Created by locusdagraca on 7/25/2023 in #questions
fetching dynamic data in layout, not page
You can pull the navbar into its own component, and make the underlying layout a server component. The use refresh should work after that.
5 replies
TTCTheo's Typesafe Cult
Created by meeepsss on 7/25/2023 in #questions
bloody confused by the new Next.js server actions
Tldr; The best way to use server actions is in the forms as they simplify submission, and in client components that mutate the database or load data from the database, where the component does not have shared state with the rest of the application. As of now.
8 replies
TTCTheo's Typesafe Cult
Created by meeepsss on 7/25/2023 in #questions
bloody confused by the new Next.js server actions
I'm making an application that uses them extensively and I've gotten quite familiar with some of the caveats. Primarily, They simplify the logic of forms. They don't really mesh with redux as they require use transitionz and I can't figure out how to combine with Redux. You can use them for form submission still, but I wouldn't use them everywhere should you like the remix pattern from my experience. They're also good for routes or components, that don't require a lot of shared state.
8 replies
TTCTheo's Typesafe Cult
Created by meeepsss on 7/25/2023 in #questions
bloody confused by the new Next.js server actions
If you use server actions anywhere else, You're using them in a use transition, which is a react feature to run non-blocking code, next hooks into this by doing network calls during this time and putting the results into it like a socket.
8 replies
TTCTheo's Typesafe Cult
Created by meeepsss on 7/25/2023 in #questions
bloody confused by the new Next.js server actions
For forms, I believe they're natively capable of running some networking, so on submit, They use the legacy features that are baked into forms and how they function.
8 replies