Skip to content

Commit

Permalink
update steps
Browse files Browse the repository at this point in the history
  • Loading branch information
aurorascharff committed Nov 22, 2024
1 parent e3d1faa commit 19a8c8c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion STEPS.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Error boundaries for each route module using useRouteError. Here we catch the er

Lets move to the jokes.new.tsx route module. Default export has a form. Don't worry about this optimistic update yet let's just look at the form. Remix Form component will provide extra features ontop of default form component, such as client side nav avoiding full page reload.

There is a method post on this, which will call the route for the route module with its action. The action validates using zod and returns errors if invalid inside a badrequest wrapper. Customizable. Then it redirects.
There is a method post on this, which will call the route for the route module with its action. The action validates using zod and returns errors if invalid inside a badrequest wrapper. Customizable. Then it redirects. Show console of network tab to show the post and get requests. GET data joke.new. POST data joke.new with localation. New GET for revalidation.

We dont need api routes to talk to our server from the client.

Expand Down
2 changes: 1 addition & 1 deletion db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const globalForPrisma = global as unknown as {
export const prisma =
globalForPrisma.prisma ??
new PrismaClient({
log: ['query'],
// log: ['query'],
});

if (process.env.NODE_ENV !== 'production') globalForPrisma.prisma = prisma;

0 comments on commit 19a8c8c

Please sign in to comment.