We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 27cde47 commit 7692b29Copy full SHA for 7692b29
chapter-10/todo_react_motion/src/todos/views/todoList.js
@@ -19,8 +19,8 @@ const willEnter = () => {
19
};
20
21
22
-const TodoList = ({todos}) => {
23
- const styles = todos.map(item => {
+const getStyles = (todos) => {
+ return todos.map(item => {
24
return {
25
key: item.id.toString(),
26
data: item,
@@ -30,7 +30,11 @@ const TodoList = ({todos}) => {
30
}
31
32
});
33
+}
34
35
+
36
+const TodoList = ({todos}) => {
37
+ const styles = getStyles(todos);
38
return (
39
<TransitionMotion
40
willLeave={willLeave}
0 commit comments