Skip to content

Commit

Permalink
fix: layout effect (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
淇¢懌-King committed Feb 18, 2020
1 parent 841752c commit 52cf115
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/plugin-locale/src/locale.tpl
Expand Up @@ -18,7 +18,7 @@ export const _LocaleContainer = props => {
setContainerIntl(getIntl());
};

React.useEffect(() => {
React.useLayoutEffect(() => {
event.on(LANG_CHANGE_EVENT, handleLangChange);
return () => {
event.off(LANG_CHANGE_EVENT, handleLangChange);
Expand Down

0 comments on commit 52cf115

Please sign in to comment.