# Persistence as the single source of truth

DevFeed: [Persistence as the single source of truth](<https://devfeed.tech/articles/persistence-as-the-single-source-of-truth-29034.md>)

Original publisher: [Read original article](<https://saket.me/persistence-as-the-single-source-of-truth/>)

Author: Saket Narayan

Published: 2018-07-26T14:51:38Z

Content type: article

Language: en

Sources: [Saket Narayan](<https://devfeed.tech/sources/saket-narayan.md>)

Topics: [Persistence](<https://devfeed.tech/topics/persistence.md>), [Android](<https://devfeed.tech/topics/android.md>), [data](<https://devfeed.tech/topics/data.md>), [reactive](<https://devfeed.tech/topics/reactive.md>), [ui](<https://devfeed.tech/topics/ui.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [architecture](<https://devfeed.tech/tags/architecture.md>), [data](<https://devfeed.tech/tags/data.md>), [flow](<https://devfeed.tech/tags/flow.md>), [offline](<https://devfeed.tech/tags/offline.md>), [persistence](<https://devfeed.tech/tags/persistence.md>), [public-speaking](<https://devfeed.tech/tags/public-speaking.md>), [reactive](<https://devfeed.tech/tags/reactive.md>), [state-management](<https://devfeed.tech/tags/state-management.md>)

## AI overview

This article describes persistence as the single source of truth for Android UI state. It proposes making persistent storage the source of data changes while the UI reactively represents persisted data, creating a unidirectional data flow. The approach is presented as architecture-agnostic and as supporting state restoration, offline use, and immediate feedback.

## Source excerpt

Simple is better than complex. Complex is better than complicated. In the world of Android, where all sources of information and user interactions are asynchronous, UI state can become hard to reason about, especially in large apps. This is not only difficult to maintain but also increases complexity with the addition of every new feature. [...] The post Persistence as the single source of truth appeared first on Saket Narayan.