Skip to content

Commit b160d0d

Browse files
authored
chore: supply the translation of permalink parameter of useActionState hook (#1739)
2 parents 00eac8c + b31a8a5 commit b160d0d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/content/reference/react/useActionState.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ form state 是一个只在表单被提交触发 action 后才会被更新的值
5959
6060
* `fn`:当按钮被按下或者表单被提交时触发的函数。当函数被调用时,该函数会接收到表单的上一个 state(初始值为传入的 `initialState` 参数,否则为上一次执行完该函数的结果)作为函数的第一个参数,余下参数为普通表单动作接到的参数。
6161
* `initialState`:state 的初始值。任何可序列化的值都可接收。当 action 被调用一次后该参数会被忽略。
62-
* **可选的** `permalink`: A string containing the unique page URL that this form modifies. For use on pages with dynamic content (eg: feeds) in conjunction with progressive enhancement: if `fn` is a [server function](/reference/rsc/server-functions) and the form is submitted before the JavaScript bundle loads, the browser will navigate to the specified permalink URL, rather than the current page's URL. Ensure that the same form component is rendered on the destination page (including the same action `fn` and `permalink`) so that React knows how to pass the state through. Once the form has been hydrated, this parameter has no effect.
62+
* **可选的** `permalink`:一个包含了在特定情况下(后述)表单提交后将跳转到的独立 URL 的字符串。此参数用于渐进式地增强应用了动态内容的页面(例如 feeds):如果 `fn` 是一个 [服务器函数](/reference/rsc/server-functions),并且表单在 JavaScript 包加载之前提交,则浏览器将导航到指定的 `permalink` URL,而不是当前页面的 URL。确保在目标页面上渲染相同的表单组件(包括相同的 `fn` `permalink` ),以便 React 知道应如何同步状态。一旦表单被激活,此参数将不再起作用。
6363
6464
{/* TODO T164397693: link to serializable values docs once it exists */}
6565

0 commit comments

Comments
 (0)