官术网_书友最值得收藏!

  • React Components
  • Christopher Pitt
  • 241字
  • 2021-07-09 19:34:46

Chapter 3. Saving and Communicating Data

In the previous chapter, we created complex component hierarchies. We created a list of pages and a way to edit those pages. Yet we stopped short of saving and reading any of that data to some kind of storage.

We could, for instance, send an edit through an Ajax request to be saved in a database server. In fact, that's what often happens in the applications we use these days. They always save our interactions, irrespective of whether we expect them to or not.

In this chapter, you will learn about local data stores and communicating with them. You'll also learn about event-based architecture and how it promotes the unidirectional flow of data.

There are many ways to save data. It's a rich and interesting topic that could fill scores of books. I could go so far as to say it is at the core of how businesses and applications work.

Furthermore, how data is communicated can often be different in a maintainable application and an unmaintainable application. It's up to us to figure out elegant ways of persisting data so that our applications remain maintainable.

We will only explore local storage in this chapter. You'll be able to see your stored data beyond page reloads, but nobody else will. You cannot build a practical website based on this chapter alone. You will have to wait until we explore React on the server.

主站蜘蛛池模板: 永修县| 鄢陵县| 南昌县| 红原县| 合作市| 怀仁县| 保德县| 达拉特旗| 德钦县| 舞阳县| 朝阳市| 渭南市| 清镇市| 武汉市| 若羌县| 阿瓦提县| 石棉县| 绍兴县| 泽普县| 正镶白旗| 江达县| 奉新县| 宜良县| 江陵县| 赤水市| 措美县| 青龙| 娄烦县| 沐川县| 玛沁县| 天全县| 枣阳市| 霸州市| 循化| 安康市| 台湾省| 新乐市| 金平| 霞浦县| 大庆市| 孟津县|