Skip to content

Commit

Permalink
feat(UIView): force component re-mount on reload()
Browse files Browse the repository at this point in the history
BREAKING CHANGE: when a state is entered/exited the State Component is remounted, re-running its lifecycle methods.

Closes #172
  • Loading branch information
elboman committed May 9, 2018
1 parent 7dfc87c commit d01162a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/UIView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,8 @@ class View extends Component<UIViewProps, UIViewState> {
}

this.uiViewData.config = newConfig;
let props = { ...resolves, transition: trans };
const key = Date.now();
let props = { ...resolves, transition: trans, key };

let newComponent = newConfig && newConfig.viewDecl && newConfig.viewDecl.component;
this.setState({
Expand Down

0 comments on commit d01162a

Please sign in to comment.