old_contents: import React from 'react';
  
  class PostsIndex extends React.Component {
    render() {
      return (
        <div className='posts-index'>
          Posts Index
        </div>
      )
    }
  }
  
  export default PostsIndex;
  
new_contents: import React from 'react';
  import { connect } from 'react-redux';
  import { fetchPosts } from '../actions';
  
  
  class PostsIndex extends React.Component {
    componentDidMount() {
      this.props.fetchPosts();
    }
  
    render() {
      return (
        <div className='posts-index'>
          Posts Index
        </div>
      )
    }
  }
  
  export default connect(null, { fetchPosts: fetchPosts })(PostsIndex);
  
subject: Call fetchPosts when PostsIndex components mounts