Skip to content

Commit 2ce3cc3

Browse files
authored
docs(config): document debug attr (#74)
1 parent 669fc14 commit 2ce3cc3

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,16 @@ This hook returns the current database client with some helpful functions for sy
187187

188188
Check out the [Firebase example](https://homebaseio.github.io/homebase-react/#!/example.todo_firebase) for a demonstration of how you might integrate a backend.
189189

190+
## Debugging tips
191+
192+
If you set `debug` to `true` in your configuration, you will be able to access the `_recentlyTouchedAttributes` attribute on entities. `_recentlyTouchedAttributes` will show any cached attributes for a given entity. This is helpful for approximating that entity's schema and values.
193+
194+
```js
195+
<HomebaseProvider config={ debug: true }>
196+
<App/>
197+
</HomebaseProvider>
198+
```
199+
190200
## Roadmap
191201

192202
1. Document integration with more backends

docs/0400|API.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ const config = {
1818
}
1919
},
2020

21+
// Set `debug` to true in order to access the _recentlyTouchedAttributes attribute on your entities
22+
// _recentlyTouchedAttributes shows any cached attributes for a given entity
23+
// This is helpful for approximating that entity's schema and values
24+
debug: true,
25+
2126
// Initial data is what it sounds like.
2227
// It's a transaction that runs on component mount.
2328
// Use it to hydrate your app.

0 commit comments

Comments
 (0)