mirror of
https://github.com/vercel/next-learn.git
synced 2026-06-24 05:05:47 +00:00
update types/react and types/react-dom packages and remove workaround
This commit is contained in:
@@ -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: [] };
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"types": ["react-dom/experimental"],
|
||||
"target": "es5",
|
||||
"lib": ["dom", "dom.iterable", "esnext"],
|
||||
"allowJs": true,
|
||||
|
||||
Reference in New Issue
Block a user