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

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.

主站蜘蛛池模板: 邢台县| 得荣县| 乌恰县| 铅山县| 德钦县| 满城县| 萍乡市| 乐至县| 丰原市| 扬中市| 内黄县| 石台县| 清水河县| 平阳县| 鄂伦春自治旗| 梁平县| 鹤山市| 柳河县| 叶城县| 新津县| 明溪县| 达拉特旗| 台湾省| 松潘县| 乌兰察布市| 海原县| 崇仁县| 平遥县| 六盘水市| 巴南区| 石河子市| 巧家县| 贵南县| 衢州市| 民丰县| 乐昌市| 姚安县| 辽宁省| 射阳县| 古蔺县| 喀喇沁旗|