Skip to content

Commit 313c799

Browse files
committed
Map props.key to state.intl.locale
See proposed solution to switching locales with react-redux formatjs/formatjs#234 (comment) I tweaked mapStateToProps to set props.key to state.intl.locale so that a re-render occurs when locale is hot swapped.
1 parent 385b554 commit 313c799

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/components/Provider.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ const mapStateToProps = (state) => {
77
const {intl} = state
88
return {
99
...intl,
10+
key: intl.locale,
1011
}
1112
}
1213

0 commit comments

Comments
 (0)