1.8 KiB
1.8 KiB
id | title | challengeType | isRequired |
---|---|---|---|
5a24c314108439a4d403614d | Define a Redux Action | 6 | false |
Description
type
property that specifies the 'type' of action that occurred.
Think of Redux actions as messengers that deliver information about events happening in your app to the Redux store. The store then conducts the business of updating state based on the action that occurred.
Instructions
action
and give it a property type
set to the string 'LOGIN'
.
Tests
tests:
- text: An action object should exist.
testString: assert((function() { return typeof action === 'object' })(), 'An action object should exist.');
- text: The action should have a key property type with value <code>LOGIN</code>.
testString: assert((function() { return action.type === 'LOGIN' })(), 'The action should have a key property type with value <code>LOGIN</code>.');
Challenge Seed
// Define an action here:
Solution
const action = {
type: 'LOGIN'
}