Logging the region application

Our second application is more interesting, given that we are doing actual async requests, the amount of data to process is larger, and the screen display, while still a bit simple, is at least more complex than the counter display. When we start the application, the dropdown used an action to request the whole list of countries, as you can see in this screenshot: 

  The drop-down component dispatched an action to get the countries (countries:request), and it proved successful (countries:success) returning a list with 249 countries

After the countries were loaded, I decided to pick France (a very small homage to the FIFA Soccer World champions of 2018!), and some new actions were fired, as shown in the next screenshot:

 The results of picking a country: several actions were dispatched and the API was called

For the sake of a smaller display, I compacted the two first actions, and I could then expand the last one, showing the answer that was received from our own server. You can check that all regions are correctly displayed, though in alphabetic order, as we had sorted the list by name.

With this logger, you have already a good tool to see what happens in the React+Redux applications—but we'll add yet another tool for a even better way of working.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.134.78.106