--- id: 5a24c314108439a4d403614e title: Define an Action Creator challengeType: 6 isRequired: false videoUrl: '' localeTitle: Definir un creador de acción --- ## Description
Después de crear una acción, el siguiente paso es enviar la acción al almacén de Redux para que pueda actualizar su estado. En Redux, se definen creadores de acciones para lograr esto. Un creador de acciones es simplemente una función de JavaScript que devuelve una acción. En otras palabras, los creadores de acciones crean objetos que representan eventos de acción.
## Instructions
Defina una función llamada actionCreator() que devuelve el objeto de action cuando se le llama.
## Tests
```yml tests: - text: La función actionCreator debería existir. testString: 'assert(typeof actionCreator === "function", "The function actionCreator should exist.");' - text: Ejecutar la función actionCreator debe devolver el objeto de acción. testString: 'assert(typeof action === "object", "Running the actionCreator function should return the action object.");' - text: La acción devuelta debe tener un tipo de propiedad clave con el valor LOGIN . testString: 'assert(action.type === "LOGIN", "The returned action should have a key property type with value LOGIN.");' ```
## Challenge Seed
```jsx const action = { type: 'LOGIN' } // Define an action creator here: ```
## Solution
```js // solution required ```