// The types of actions that you can dispatch to modify the state of the store
export const types = {
  ADD: 'ADD',
  REMOVE: 'REMOVE',
}

// Helper functions to dispatch actions, optionally with payloads
export const actionCreators = {
  add: (item) => {
    return {type: types.ADD, payload: item}
  },
  remove: (index) => {
    return {type: types.REMOVE, payload: index}
  }
}

// Initial state of the store
const initialState = {
  todos: ['Click to remove', 'Learn React Native', 'Write Code', 'Ship App'],
}

// Function to handle actions and update the state of the store.
// Notes:
// - The reducer must return a new state object. It must never modify
//   the state object. State objects should be treated as immutable.
// - We set \`state\` to our \`initialState\` by default. Redux will
//   call reducer() with no state on startup, and we are expected to
//   return the initial state of the app in this case.
export const reducer = (state = initialState, action) => {
  const {todos} = state
  const {type, payload} = action

  switch (type) {
    case types.ADD: {
      return {
        ...state,
        todos: [payload, ...todos],
      }
    }
    case types.REMOVE: {
      return {
        ...state,
        todos: todos.filter((todo, i) => i !== payload),
      }
    }
  }

  return state
}

@@ -1,8 +1,21 @@
+/* @flow */%0A%0A
 // The t
@@ -85,16 +85,16 @@
 e store%0A
-
 export c
@@ -255,16 +255,24 @@
 d: (item
+: string
 ) =%3E %7B%0A 
@@ -335,16 +335,24 @@
 : (index
+: number
 ) =%3E %7B%0A 
@@ -464,80 +464,59 @@
 %7B%0A  
-todos: %5B'Click to remove', 'Learn React Native', 'Write Code', 'Ship App
+players: %5B'Hannah', 'Markus', 'Tobi', 'Lo', 'Moritz
 '%5D,%0A
@@ -954,16 +954,37 @@
 = (state
+: typeof initialState
  = initi
@@ -998,16 +998,46 @@
 , action
+: %7Btype: string, payload: any%7D
 ) =%3E %7B%0A 
@@ -1044,20 +1044,22 @@
  const %7B
-todo
+player
 s%7D = sta
@@ -1196,20 +1196,22 @@
 oad, ...
-todo
+player
 s%5D,%0A    
@@ -1293,20 +1293,22 @@
  todos: 
-todo
+player
 s.filter

Use players instead of todos