* Renders the current view. * @return Element to render.
()
| 74 | * @return Element to render. |
| 75 | */ |
| 76 | private renderCurrentView() { |
| 77 | const { stack } = this.state |
| 78 | |
| 79 | if (stack.length === 0) { |
| 80 | return |
| 81 | } |
| 82 | |
| 83 | const [activeView, previousView] = stack |
| 84 | |
| 85 | return ( |
| 86 | <CSSTransition classNames={Classes.PANEL_STACK} key={stack.length} timeout={400}> |
| 87 | <View previousView={previousView} onPop={this.popView} onPush={this.pushView} view={activeView} /> |
| 88 | </CSSTransition> |
| 89 | ) |
| 90 | } |
| 91 | |
| 92 | /** |
| 93 | * Pushes a view to the stack. |