next.js
9cd46e33 - docs: Renamed function that is used by other name (#56170)

Commit
2 years ago
docs: Renamed function that is used by other name (#56170) In "app/actions.ts" the function is named like create(), but in "app/add-form.tsx" file "createTodo" function is imported and used. This is related to TypeScript examples, .js files are ok. ### What? Renamed a function. ### Why? There are two example files in docs ([Error Handling](https://nextjs.org/docs/app/building-your-application/data-fetching/forms-and-mutations#error-handling) section) and the `app/add-form.tsx` is importing function `create` from `app/actions.ts` by another name (`createTodo`). ### How? Fixed by renaming function to `createTodo`, to match .js file with the same example.
Author
Parents
Loading