Skip to content

Commit c5f12f9

Browse files
authored
React 19 stable. (#946)
1 parent 0e41ddc commit c5f12f9

File tree

5 files changed

+166
-205
lines changed

5 files changed

+166
-205
lines changed

dashboard/final-example/app/lib/actions.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -108,15 +108,8 @@ export async function updateInvoice(
108108
}
109109

110110
export async function deleteInvoice(id: string) {
111-
// throw new Error('Failed to Delete Invoice');
112-
113-
try {
114-
await sql`DELETE FROM invoices WHERE id = ${id}`;
115-
revalidatePath('/dashboard/invoices');
116-
return { message: 'Deleted Invoice' };
117-
} catch (error) {
118-
return { message: 'Database Error: Failed to Delete Invoice.' };
119-
}
111+
await sql`DELETE FROM invoices WHERE id = ${id}`;
112+
revalidatePath('/dashboard/invoices');
120113
}
121114

122115
export async function authenticate(

dashboard/final-example/package.json

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"private": true,
33
"scripts": {
44
"build": "next build",
5-
"dev": "next dev --turbo",
5+
"dev": "next dev --turbopack",
66
"start": "next start"
77
},
88
"dependencies": {
@@ -12,26 +12,20 @@
1212
"autoprefixer": "10.4.20",
1313
"bcrypt": "^5.1.1",
1414
"clsx": "^2.1.1",
15-
"next": "^15.0.3",
15+
"next": "latest",
1616
"next-auth": "5.0.0-beta.19",
1717
"postcss": "8.4.49",
18-
"react": "19.0.0-rc-cd22717c-20241013",
19-
"react-dom": "19.0.0-rc-cd22717c-20241013",
20-
"tailwindcss": "3.4.15",
18+
"react": "19.0.0",
19+
"react-dom": "19.0.0",
20+
"tailwindcss": "3.4.16",
2121
"typescript": "5.7.2",
2222
"use-debounce": "^10.0.4",
2323
"zod": "^3.23.8"
2424
},
2525
"devDependencies": {
2626
"@types/bcrypt": "^5.0.2",
2727
"@types/node": "22.10.1",
28-
"@types/react": "npm:[email protected]",
29-
"@types/react-dom": "npm:[email protected]"
30-
},
31-
"pnpm": {
32-
"overrides": {
33-
"@types/react": "npm:[email protected]",
34-
"@types/react-dom": "npm:[email protected]"
35-
}
28+
"@types/react": "19.0.0",
29+
"@types/react-dom": "19.0.0"
3630
}
3731
}

0 commit comments

Comments
 (0)