JSConf Budapest, June 2-3, 2022 Presented by: Mark Brouch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { Component } from 'react'; | |
| import PubSub from 'pubsub-js'; | |
| class App extends Component { | |
| state = { show: true }; | |
| render() { | |
| return ( | |
| <div className="App"> | |
| <button onClick={() => this.setState(state => ({ show: !state.show }))}> | |
| {this.state.show ? 'Hide panel' : 'Show panel'} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Depth-first and Breadth-first graph traversals. | |
| * | |
| * In this diff we implement non-recursive algorithms for DFS, | |
| * and BFS maintaining an explicit stack and a queue. | |
| * | |
| * by Dmitry Soshnikov <[email protected]> | |
| * MIT Style license | |
| */ |