Files
freeCodeCamp/curriculum/challenges/russian/03-front-end-libraries/redux/define-an-action-creator.russian.md
elcodex a863078b02 [Rus] Improved the translation of Redux challenges (part 2) (#34324)
* [Rus] Improved the translation

Changed file "get-state-from-the-redux-store.russian.md"

* Changed line 11

* Improved the translation

* Improved the translation

* Added the translation to sections 

also improved the translation of the sections "tests" and "challengeSeed"

* Improved the translation
2019-05-13 22:54:22 -07:00

58 lines
2.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
id: 5a24c314108439a4d403614e
title: Define an Action Creator
challengeType: 6
isRequired: false
videoUrl: ''
localeTitle: Определить создателя действия
---
## Description
<section id="description"> После создания действия следующий шаг - отправление действия в хранилище Redux, чтобы обновить свое состояние. В Redux вы определяете создателей действий для завершения процесса. Создатель действия - это просто функция JavaScript, которая возвращает действие. Другими словами, создатели действий создают объекты, которые представляют события действия. </section>
## Instructions
<section id="instructions"> Определите функцию <code>actionCreator()</code> , которая возвращает объект <code>action</code> при вызове. </section>
## Tests
<section id='tests'>
```yml
tests:
- text: Функция <code>actionCreator</code> должна существовать.
testString: 'assert(typeof actionCreator === "function", "The function <code>actionCreator</code> should exist.");'
- text: Запуск функции <code>actionCreator</code> должен вернуть объект действия.
testString: 'assert(typeof action === "object", "Running the <code>actionCreator</code> function should return the action object.");'
- text: Возвращаемое действие должно иметь свойство type со значением <code>LOGIN</code> .
testString: 'assert(action.type === "LOGIN", "The returned action should have a key property type with value <code>LOGIN</code>.");'
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='jsx-seed'>
```jsx
const action = {
type: 'LOGIN'
}
// Определите создателя действия здесь:
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
</section>