From 8e1e3b8fe12fc02ea2459adc247c0cc606bb3b0d Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Thu, 12 Mar 2020 10:18:28 +0200 Subject: [PATCH] TaskListItem: change from anonymous to named function. Other than the stylistic choice, this is also very useful for the react dev tools, which show the component's name. --- src/components/Tasks/TaskListItem.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/components/Tasks/TaskListItem.tsx b/src/components/Tasks/TaskListItem.tsx index 4a17a2e..f185b20 100644 --- a/src/components/Tasks/TaskListItem.tsx +++ b/src/components/Tasks/TaskListItem.tsx @@ -14,7 +14,7 @@ interface PropsType { onSave: (item: PimType, journalUid: string, originalItem?: PimType) => Promise; } -const TaskListItem = React.memo((props: PropsType) => { +export default React.memo(function TaskListItem(props: PropsType) { const { entry: task, onClick, @@ -42,5 +42,3 @@ const TaskListItem = React.memo((props: PropsType) => { /> ); }); - -export default TaskListItem; \ No newline at end of file