Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
add pop method to Route, allowing this.props.route.pop() inside compo…
…nents
  • Loading branch information
lrettig committed Mar 14, 2016
commit 6a7fec1db3922d83f1a760646e8a3dd548e4d243
8 changes: 6 additions & 2 deletions Route.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
*
*/

import Actions from './Actions';
import type BaseRouter from './BaseRouter';
export default class Route {
name: string;
Expand Down Expand Up @@ -41,7 +42,10 @@ export default class Route {
this.footer = footer;
this.props = props;
this.wrapRouter = wrapRouter || type=='switch';

this.pop = this.pop.bind(this)
}

}
pop(num: number = 1, props: { [key: string]: any} = {}) {
Actions.pop(num, props, this.parent);
}
}