import React from 'react';

const title = (task) => {
    return task[0];
};

const bestCaseHours = (task) => {
    return task[1];
};

const worstCaseHours = (task) => {
    return task[2];
};

class StoryTasks extends React.Component {
    render() {
        const row = (task, index) => {
            return (
                <tr key={'k' + index}>
                    <td>{title(task)}</td>
                    <td>{bestCaseHours(task)}-{worstCaseHours(task)}</td>
                </tr>
            );
        },

        rows = this.props.tasks.map(row);

        return (
            <table className="table table-striped">
                <tr>
                    <th>Task title</th>
                    <th>Estimation range (hours)</th>
                </tr>

                {rows}
            </table>
        );
    }

    shouldComponentUpdate() {
        return false;
    }
}

export default StoryTasks;

@@ -25,266 +25,67 @@
 ';%0A%0A
-const title = (task) =%3E %7B%0A    return task%5B0%5D;%0A%7D;%0A%0Aconst bestCaseHours = (task) =%3E %7B%0A    return task%5B1%5D;%0A%7D;%0A%0Aconst worstCaseHours = (task) =%3E %7B%0A    return task%5B2%5D;%0A%7D;%0A%0Aclass StoryTasks extends React.Component %7B%0A    render() %7B%0A        const row = (task
+function row(%5Btitle, bestCaseHours, worstCaseHours%5D
 , index)
  =%3E 
@@ -84,22 +84,11 @@
 dex)
- =%3E
  %7B%0A
-        
     
@@ -92,32 +92,24 @@
    return (%0A
-        
         %3Ctr 
@@ -117,20 +117,20 @@
 ey=%7B
-'k' + 
+%60k$%7B
 index%7D
+%60%7D
 %3E%0A  
@@ -135,32 +135,24 @@
             
- 
-       
 %3Ctd%3E%7Btitle(t
@@ -149,37 +149,23 @@
 d%3E%7Btitle
-(task)
 %7D%3C/td%3E%0A
-        
         
@@ -186,22 +186,16 @@
 aseHours
-(task)
 %7D-%7Bworst
@@ -207,14 +207,8 @@
 ours
-(task)
 %7D%3C/t
@@ -214,32 +214,24 @@
 td%3E%0A        
-  
-      
 %3C/tr%3E%0A      
@@ -232,30 +232,71 @@
     
-        );%0A        %7D,%0A
+);%0A%7D%0A%0Aclass StoryTasks extends React.Component %7B%0A    render() %7B
 %0A   
@@ -300,16 +300,22 @@
         
+const 
 rows = t
@@ -387,17 +387,17 @@
 assName=
-%22
+'
 table ta
@@ -411,9 +411,9 @@
 iped
-%22
+'
 %3E%0A  

Refactor & lint StoryTasks