Add the constant SET_STORAGE_DATA
to src/external/redux/constants
, equal to its name.
Add the readAsyncStorage
function to the src/external/redux/actions
file and export it.
This method should return an asynchronous function with one dispatch
argument.
In the closure, we first read the data for the keys LISTS
and WORDS
using readStorage
.
Then you need to dispatch the action with SET_STORAGE_DATA
type
.
payload
must be an object with LISTS
and WORDS
fields equal to the data read.
If there is no data, specify an empty array.
This task is part of the Full-Stack JavaScript Course.
If you have any issues with it, you can ask for community help below the post.
Feel free to help others if you’ve already solved the task.