refine the translation of chapter 12-context#6665
refine the translation of chapter 12-context#6665jimfb merged 1 commit intofacebook:masterfrom Yaxian:DOC/refine-chap12-translation
Conversation
|
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at cla@fb.com. Thanks! |
|
@facebook-github-bot-7 I have registered. |
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
| render: function() { | ||
| return ( | ||
| <button style={{'{{'}}background: this.context.color}}> | ||
| <button style={{background: this.context.color}}> |
There was a problem hiding this comment.
This was correct as-is, as per our MD generator. You should try rendering the docs as described in the README in the docs directory.
There was a problem hiding this comment.
I think it worked fine in browser after modifying.
There was a problem hiding this comment.
This (and the others like it you changed) needs to be written as it was, as Jim said. It may render correctly in the GH preview but will not render correctly when using Jekyll because {{ is an opening tag for Liquid templating which is used for the actual website..
There was a problem hiding this comment.
@zpao Sorry, I did not know that {{ is a Jekyll's opening tag. Thank you for it. And I already reverted the change.
|
Also, looks like there are merge conflicts. |
|
@jimfb OK, I will fix it. |
|
@Yaxian updated the pull request. |
| > Context是一个先进的实验性特性,这个 API 很可能在未来版本变化。 | ||
| > | ||
| > 大多数应用将不会需要用到 context. 尤其是如果你刚开始用React,你很可能不会想用 context.使用 context 将会使你的代码很难理解因为它让数据流不清晰.它类似于在你的应用里使用全局变量传递state. | ||
| > 大多数应用将不会需要用到 context。 尤其是如果你刚开始用React,你很可能不会想用 context。使用 context 将会使你的代码很难理解,因为它让数据流不清晰。它类似于在你的应用里使用全局变量传递state。 |
There was a problem hiding this comment.
Would you remove the whitespace after the first "。"?
|
@Yaxian updated the pull request. |
| 有时,你想不通过在每一级组件设置prop的方式来向组件树内传递数据。那么,React的"context"特性可以让你做到这点。 | ||
|
|
||
| > 注意: | ||
| > |
There was a problem hiding this comment.
Removing the empty ">" lines might affect Jekyll's Markdown parsing. I could be wrong though. Could you build the docs (instructions here) to double check if the page renders correctly? Thanks! 😀
There was a problem hiding this comment.
OK, I will have fixed it, and squashed the commits.
|
@Yaxian updated the pull request. |
1 similar comment
|
@Yaxian updated the pull request. |
|
@Yaxian updated the pull request. |
|
I think this is ready to merge. |
|
Ok, thanks @Yaxian and @keyanzhang! |
(cherry picked from commit 9ddf9e1)
Hi, I made the translation of
contextbetter.