Skip to content
This repository was archived by the owner on Jan 10, 2024. It is now read-only.

Commit dae266d

Browse files
author
Eugene Manuilov
committed
Updated readme
1 parent 164a62c commit dae266d

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
**Implemented enhancements:**
66

7-
-
7+
- Implemented ability to get wrapped component.
88

99
## v0.3.3 (2017-08-12)
1010

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,14 @@ See an [example](https://github.com/eugene-manuilov/react-gettext/tree/master/ex
104104

105105
## Documentation
106106

107-
### withGettext(translations, pluralForms)
107+
### withGettext(translations, pluralForms, options)
108108

109109
Higher-order function which is exported by default from `react-gettext` package. It accepts two arguments and returns function to create higher-order component.
110110

111111
- **translations**: a hash object or a function which returns hash object where keys are original messages and values are translated messages.
112112
- **pluralForms**: a string to calculate plural form (used by [Gettext PO](http://docs.translatehouse.org/projects/localization-guide/en/latest/l10n/pluralforms.html?id=l10n/pluralforms)) or a function which accepts a number and calculates a plural form number. Pay attentions that plural forms are zero-based what means to get 1st plural form it should return 0, to get 2nd - 1, and so on.
113+
- **options**: a hash object with options. Currently supports following options:
114+
- **withRef**: an optional boolean flag that determines whether or not to set `ref` property to a wrapped component what will allow you to get wrapped component instance by calling `getWrappedComponent()` function of the HOC. By default: `FALSE`.
113115

114116
Example:
115117

0 commit comments

Comments
 (0)