-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Removed React context mention in the documentation #2841
Conversation
…your own components
Replaces #2829 |
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.
s/The react-admin package/React-admin/
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.
s/of wrapped component/of the wrapped component/
docs/Translation.md
Outdated
``` | ||
|
||
However, using the context makes components harder to test. That's why react-admin provides a `translate` Higher-Order Component, which simply passes the `translate` function from context to props: | ||
The react-admin package provides a `translate` Higher-Order Component, which simply passes the `translate` function to props of wrapped component: |
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.
The react-admin package provides a `translate` Higher-Order Component, which simply passes the `translate` function to props of wrapped component: | |
React-admin provides a `translate` Higher-Order Component, which simply injects the `translate` function to the wrapped component: |
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.
Thanks for this PR 👍
docs/Translation.md
Outdated
@@ -5,7 +5,7 @@ title: "Translation" | |||
|
|||
# Translation | |||
|
|||
The react-admin interface uses English as the default language. But it also supports any other language, thanks to the [polyglot.js](http://airbnb.io/polyglot.js/) library. | |||
React-admin interface uses English as the default language. But it also supports any other language, thanks to the [polyglot.js](http://airbnb.io/polyglot.js/) library. |
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.
This one should have kept the The
as we are refering to the interface 😉
docs/Translation.md
Outdated
``` | ||
|
||
However, using the context makes components harder to test. That's why react-admin provides a `translate` Higher-Order Component, which simply passes the `translate` function from context to props: | ||
React-admin package provides a `translate` Higher-Order Component, which simply passes the `translate` function to props of the wrapped component: |
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.
Last one I think 😄
s/to props of/as a prop to/
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.
Went really too quick :)
In the section
Translate your own components