diff --git a/dashboard/15-final/app/ui/invoices/create-form.tsx b/dashboard/15-final/app/ui/invoices/create-form.tsx index 2c234d3..c28f93b 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 { experimental_useFormState as useFormState } from 'react-dom'; +import { 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 cbf9a9c..41d14ae 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 { experimental_useFormState as useFormState } from 'react-dom'; +import { useFormState } from 'react-dom'; export default function EditInvoiceForm({ invoice, diff --git a/dashboard/15-final/tsconfig.json b/dashboard/15-final/tsconfig.json index 8c283d1..11dba1d 100644 --- a/dashboard/15-final/tsconfig.json +++ b/dashboard/15-final/tsconfig.json @@ -1,5 +1,6 @@ { "compilerOptions": { + "types": ["react-dom/experimental"], "target": "es5", "lib": ["dom", "dom.iterable", "esnext"], "allowJs": true, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 95685ac..d0f3df5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -223,11 +223,11 @@ importers: specifier: 20.5.7 version: 20.5.7 '@types/react': - specifier: 18.2.21 - version: 18.2.21 + specifier: 18.2.32 + version: 18.2.32 '@types/react-dom': - specifier: 18.2.7 - version: 18.2.7 + specifier: 18.2.14 + version: 18.2.14 '@vercel/postgres': specifier: ^0.5.0 version: 0.5.0 @@ -1036,10 +1036,10 @@ packages: /@types/prop-types@15.7.9: resolution: {integrity: sha512-n1yyPsugYNSmHgxDFjicaI2+gCNjsBck8UX9kuofAKlc0h1bL+20oSF72KeNaW2DUlesbEVCFgyV2dPGTiY42g==} - /@types/react-dom@18.2.7: - resolution: {integrity: sha512-GRaAEriuT4zp9N4p1i8BDBYmEyfo+xQ3yHjJU4eiK5NDa1RmUZG+unZABUTK4/Ox/M+GaHwb6Ow8rUITrtjszA==} + /@types/react-dom@18.2.14: + resolution: {integrity: sha512-V835xgdSVmyQmI1KLV2BEIUgqEuinxp9O4G6g3FqO/SqLac049E53aysv0oEFD2kHfejeKU+ZqL2bcFWj9gLAQ==} dependencies: - '@types/react': 18.2.21 + '@types/react': 18.2.32 dev: false /@types/react@18.2.21: @@ -1048,6 +1048,15 @@ packages: '@types/prop-types': 15.7.9 '@types/scheduler': 0.16.5 csstype: 3.1.2 + dev: true + + /@types/react@18.2.32: + resolution: {integrity: sha512-F0FVIZQ1x5Gxy/VYJb7XcWvCcHR28Sjwt1dXLspdIatfPq1MVACfnBDwKe6ANLxQ64riIJooXClpUR6oxTiepg==} + dependencies: + '@types/prop-types': 15.7.9 + '@types/scheduler': 0.16.5 + csstype: 3.1.2 + dev: false /@types/scheduler@0.16.5: resolution: {integrity: sha512-s/FPdYRmZR8SjLWGMCuax7r3qCWQw9QKHzXVukAuuIJkXkDRwp+Pu5LMIVFi0Fxbav35WURicYr8u1QsoybnQw==}