-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Translation of 'functional updater form' #612
Conversation
'Form' as in 'essays in book form'; instead of form as in 'filling in a form.' Also this translation aligns with react doc (https://zh-hant.reactjs.org/docs/hooks-reference.html#functional-updates) better :)
This pull request is being automatically deployed with ZEIT Now (learn more). 🔍 Inspect: https://zeit.co/gaearon/overreactedio/nf64qd0ox |
Hi @eyeccc can you help review my proposed change? Thank you 🙏 |
@@ -979,7 +979,7 @@ function Counter() { | |||
}, [count]); | |||
``` | |||
|
|||
為了做到這樣,我們需要問問我們自己:**我們為了什麼使用 `count` 呢?**看起來我們只為了呼叫 `setCount` 而用它。在這樣的情況下,我們並不真的需要 `count`。當我們想要根據前一次的 state 來更新現在的 state,我們可以使用 `setState` 的 [函式更新表單(functional updater form)](https://reactjs.org/docs/hooks-reference.html#functional-updates): | |||
為了做到這樣,我們需要問問我們自己:**我們為了什麼使用 `count` 呢?**看起來我們只為了呼叫 `setCount` 而用它。在這樣的情況下,我們並不真的需要 `count`。當我們想要根據前一次的 state 來更新現在的 state,我們可以使用 `setState` 的 [函數形式的更新器(functional updater form)](https://reactjs.org/docs/hooks-reference.html#functional-updates): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey. Thanks for noticing my wrong translation.
I think maybe we can use 函數式更新形式 to align with the React document?
Ref:
「+」和「-」按鈕使用了函數式形式
The ”+” and ”-” buttons use the functional form
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"函數式" + "更新形式" sounds a bit redundant, how about "函數形式的更新" or "函數式更新法"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"函數形式的更新" sounds good!
And just noticed there is also
How about "這個形式的更新也對其他情況有幫助" or "這種更新的方式也對其他情況有幫助" |
"這種更新的方式也對其他情況有幫助" looks good. Thanks for catching that error. |
Hi there,
I happen to notice there might be a better way to translate 'functional form updater' to zh-tw.
'Form' as in 'essays in book form'; instead of form as in 'filling in a form.'
Also this translation aligns with react doc (https://zh-hant.reactjs.org/docs/hooks-reference.html#functional-updates) better :)