diff --git a/dashboard/15-final/app/ui/invoices/create-form.tsx b/dashboard/15-final/app/ui/invoices/create-form.tsx index c28f93b..2c234d3 100644 --- a/dashboard/15-final/app/ui/invoices/create-form.tsx +++ b/dashboard/15-final/app/ui/invoices/create-form.tsx @@ -11,7 +11,7 @@ import { import { Button } from '../button'; import { createInvoice } from '@/app/lib/actions'; // @ts-ignore React types do not yet include useFormState -import { useFormState } from 'react-dom'; +import { experimental_useFormState as useFormState } from 'react-dom'; export default function Form({ customers }: { customers: CustomerField[] }) { const initialState = { message: null, errors: [] }; diff --git a/dashboard/15-final/app/ui/invoices/edit-form.tsx b/dashboard/15-final/app/ui/invoices/edit-form.tsx index 41d14ae..cbf9a9c 100644 --- a/dashboard/15-final/app/ui/invoices/edit-form.tsx +++ b/dashboard/15-final/app/ui/invoices/edit-form.tsx @@ -11,7 +11,7 @@ import Link from 'next/link'; import { Button } from '../button'; import { updateInvoice } from '@/app/lib/actions'; // @ts-ignore React types do not yet include useFormState -import { useFormState } from 'react-dom'; +import { experimental_useFormState as useFormState } from 'react-dom'; export default function EditInvoiceForm({ invoice, diff --git a/dashboard/15-final/package.json b/dashboard/15-final/package.json index 35dcd0d..945022e 100644 --- a/dashboard/15-final/package.json +++ b/dashboard/15-final/package.json @@ -11,8 +11,8 @@ "@heroicons/react": "^2.0.18", "@tailwindcss/forms": "^0.5.6", "@types/node": "20.5.7", - "@types/react": "18.2.21", - "@types/react-dom": "18.2.7", + "@types/react": "18.2.32", + "@types/react-dom": "18.2.14", "@vercel/postgres": "^0.5.0", "autoprefixer": "10.4.15", "bcrypt": "^5.1.1", diff --git a/dashboard/15-final/tsconfig.json b/dashboard/15-final/tsconfig.json index 11dba1d..8c283d1 100644 --- a/dashboard/15-final/tsconfig.json +++ b/dashboard/15-final/tsconfig.json @@ -1,6 +1,5 @@ { "compilerOptions": { - "types": ["react-dom/experimental"], "target": "es5", "lib": ["dom", "dom.iterable", "esnext"], "allowJs": true,