Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import React, { Component } from 'react';
- import { bindActionCreators } from 'redux';
- import { connect } from 'react-redux';
- class UserList extends Component{
- render(){
- return(
- <ul>
- <li>1</li>
- <li>2</li>
- <li>3</li>
- </ul>
- );
- }
- }
- function mapStateToProps(state) {
- return {
- users: state.users
- };
- }
- //doesnt work with connect but if I remove this below
- //and uncomment the export default UserList; it works
- export default connect(mapStateToProps)(UserList);
- //export default UserList;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement