Skip to content

Commit

Permalink
[state-router] Defer router navigation to next tick
Browse files Browse the repository at this point in the history
  • Loading branch information
rexxars committed Oct 6, 2020
1 parent 70bd670 commit 3cbb061
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export default class RouterProvider extends React.Component<Props> {
UNSAFE_componentWillReceiveProps(nextProps: Props) {
if (this.props.state !== nextProps.state) {
this._state = nextProps.state
this.__internalRouter.channel.publish(nextProps.state)
setTimeout(this.__internalRouter.channel.publish, 0, nextProps.state)
}
}

Expand Down

0 comments on commit 3cbb061

Please sign in to comment.