Skip to content

Commit

Permalink
included pure from recompose to create pure functional component
Browse files Browse the repository at this point in the history
  • Loading branch information
liamzhang40 committed Oct 16, 2018
1 parent 7c16d33 commit b5571de
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 339 deletions.
6 changes: 4 additions & 2 deletions frontend/components/project/project_index_item.jsx
@@ -1,5 +1,6 @@
import React from 'react';
import { Link } from 'react-router-dom';
import { pure } from 'recompose';
import ProjectOptionDropdown from './project_option_dropdown_container';
import DropdownButton from '../button/dropdown_button';

Expand All @@ -19,12 +20,13 @@ const ProjectIndexItem = ({ project, teamId, currentUserId, className }) => {
</li>
);
}
console.log("render")

return (
<Link to={`/dashboard/teams/${teamId}/projects/${project.id}`}>
{li}
</Link>
);
};

export default ProjectIndexItem;
export default pure(ProjectIndexItem);
// creates pure functional component

0 comments on commit b5571de

Please sign in to comment.