Skip to content

Commit

Permalink
Merge branch 'main' into sync-4f9e9a56
Browse files Browse the repository at this point in the history
  • Loading branch information
lxmarinkovic authored Nov 27, 2023
2 parents 83fb963 + 461d453 commit 80db19c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/content/reference/react-dom/components/input.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ To display an input, render the [built-in browser `<input>`](https://developer.m

<Canary>

React's extensions to the `formAction` prop are currently only available in React's Canary and experimental channels. In stable releases of React `formAction` works only as a [built-in browser HTML component](https://react.dev/reference/react-dom/components#all-html-components). Learn more about [React's release channels here](/community/versioning-policy#all-release-channels).
React's extensions to the `formAction` prop are currently only available in React's Canary and experimental channels. In stable releases of React `formAction` works only as a [built-in browser HTML component]
</Canary>

[`formAction`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#formaction): A string or function. Overrides the parent `<form action>` for `type="submit"` and `type="image"`. When a URL is passed to `action` the form will behave like a standard HTML form. When a function is passed to `formAction` the function will handle the form submission. See [`<form action>`](/reference/react-dom/components/form#props).
Expand Down
1 change: 0 additions & 1 deletion src/content/reference/react/use-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,6 @@ Note that like most Hooks, `useFormState` can only be called in <CodeStep step={
Server Actions are exposed server endpoints and can be called anywhere in client code.

When using a Server Action outside of a [form](/reference/react-dom/components/form), call the Server Action in a [transition](/reference/react/useTransition), which allows you to display a loading indicator, show [optimistic state updates](/reference/react/useOptimistic), and handle unexpected errors. Forms will automatically wrap Server Actions in transitions.

```js {9-12}
import incrementLike from './actions';
import { useState, useTransition } from 'react';
Expand Down
2 changes: 1 addition & 1 deletion src/content/reference/react/useOptimistic.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export default function App() {
]);
async function sendMessage(formData) {
const sentMessage = await deliverMessage(formData.get("message"));
setMessages((messages) => [...messages, { text: sentMessage }]);
setMessages((messages) => [...messages, { text: sentMessage }]);
}
return <Thread messages={messages} sendMessage={sendMessage} />;
}
Expand Down
3 changes: 2 additions & 1 deletion src/sidebarReference.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@
},
{
"title": "useTransition",
"path": "/reference/react/useTransition"
"path": "/reference/react/useTransition",
"canary": true
}
]
},
Expand Down

0 comments on commit 80db19c

Please sign in to comment.