馃殌 CYBER WEEK SALE: 50% OFF on JavaScript Fundamentals 馃挭

Task #3801, Stage #19 - Vocabulary Builder app

The data needs to be stored somewhere. To do this, let鈥檚 use the @react-native-async-storage/async-storage library. Let鈥檚 write two functions to save and read data in the functions.js file at the root of the project....

August 15, 2020 路 1 min 路 Coderslang Master

Task #3801, Stage #2 - Vocabulary Builder app

Now let鈥檚 add some starter code for the redux store. Install the redux, react-redux and redux-thunk libraries. In the src/external/redux/constants.js file create three constants ADD_LIST, LISTS, WORDS. The meaning of each constant must be the same as its name....

August 15, 2020 路 2 min 路 Coderslang Master

Task #3801, Stage #20 - Vocabulary Builder app

Let鈥檚 add the required constants to the file src/external/redux/constants. DELETE_LIST, DELETE_WORD - the value of all constants is equal to their name. Export two more functions from src/external/redux/actions: deleteWord, deleteList....

August 15, 2020 路 1 min 路 Coderslang Master

Task #3801, Stage #21 - Vocabulary Builder app

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....

August 15, 2020 路 1 min 路 Coderslang Master

Task #3801, Stage #22 - Vocabulary Builder app

Functions deletelistresult, deletewordresult, addlistresult, addwordresult should be exported from the src/external/redux/helpers file. deleteListResult must get a state and list to delete as arguments. This method must return the updated state, filtering the lists LISTS and WORDS....

August 15, 2020 路 2 min 路 Coderslang Master

Task #3801, Stage #23 - Vocabulary Builder app

Improve the reducer. By default, it must return the initial state. The case ADD_LIST should call the addListResult method, the case ADD_WORD: addWordResult. Cases DELETE_LIST and DELETE_WORD - deleteListResult and deleteWordResult, respectively....

August 15, 2020 路 1 min 路 Coderslang Master

Task #3801, Stage #24 - Vocabulary Builder app

You need to create folders: src/containers/Words/Word, src/containers/Words/Word/Details, src/containers/Words/Word/Option. In each bottom, you need index.js file to create the appropriate components. Let鈥檚 start with the Option component. It must return the Text element....

August 15, 2020 路 2 min 路 Coderslang Master

Task #3801, Stage #25 - Vocabulary Builder app

Now let鈥檚 work on the Details component. It should return the View element. For View, the marginVertical property must be 10. Inside the View, first add a Text element: for the detailsKey value defs - the inner text is Definition:,...

August 15, 2020 路 1 min 路 Coderslang Master

Task #3801, Stage #26 - Vocabulary Builder app

Now is the time to work on the Word component. It will expand and collapse word details. To do this, add a flag using the useState hook. The initial value is false....

August 15, 2020 路 2 min 路 Coderslang Master

Task #3801, Stage #27 - Vocabulary Builder app

To display the data, you must first prepare. To do this, export the preparedDetails function from the file: src/containers/Words/Word/helpers.js. This function must receive one meanings argument. meanings is an array of objects that describe a word....

August 15, 2020 路 2 min 路 Coderslang Master