Skip to content

Instantly share code, notes, and snippets.

@gujc71
Last active November 4, 2018 02:00
Show Gist options
  • Save gujc71/77723b6aac6bd171284f327b86473366 to your computer and use it in GitHub Desktop.
Save gujc71/77723b6aac6bd171284f327b86473366 to your computer and use it in GitHub Desktop.
react_firestore
~~ 생략 ~~
import {firebase_board_list} from './App_reducer';
class BoardList extends Component {
componentDidMount() {
this.props.dispatch(firebase_board_list());
}
render() {
const { boards} = this.props;
return (
~~ 생략 ~~
);
}
}
let mapStateToProps = (state) => {
return {
boards: state.boards,
selectedBoard: state.selectedBoard
};
}
export default connect(mapStateToProps)(BoardList);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment