Created
May 23, 2017 13:53
-
-
Save Louiefigz/86420bfd58a04131db784c562cdd5593 to your computer and use it in GitHub Desktop.
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'; | |
| //When we use export default on a component, we would import that component without | |
| // curly braces like UserInput Below. | |
| import UserInput from "./components/UserInput"; | |
| //When we export a component without default: | |
| // example: export class Test extends Component | |
| // We would need to specify the class or constant within {}. | |
| // In this case, we are extracting Test which means it's being exported | |
| // without default. | |
| import { AllTasks } from './components/Tasks'; | |
| class App extends Component { | |
| render() { | |
| return ( | |
| <div> | |
| {/* Below we are currently still passing through the store function as a prop*/} | |
| <UserInput store={this.props.store} /> | |
| {/*In AllTasks Component, we are not passing in store as a function. Rather, we're going to | |
| get our state props by using connect() within the function.*/} | |
| <AllTasks /> | |
| </div> | |
| ); | |
| } | |
| } | |
| export default App; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment