Created
June 3, 2017 20:52
-
-
Save furkankadioglu/4611b7fef227dd7a522ed339c0f3ef44 to your computer and use it in GitHub Desktop.
React - Communication
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 Switcher from './components/Switcher'; | |
import './components/Switcher.css'; | |
import './App.css'; | |
class App extends Component { | |
constructor(props) { | |
super(props); | |
this.state = { trackingStatus: true }; | |
} | |
trackingStatusUpdate(data) | |
{ | |
console.log(data); | |
} | |
render() { | |
return ( | |
<div className="App"> | |
<Switcher trackingStatus={this.state.trackingStatus} trackingStatusUpdate={this.trackingStatusUpdate} /> | |
</div> | |
); | |
} | |
} | |
export default App; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment