@@ -148,7 +148,7 @@ With some more complex nested data, it can happend that the Firestore
148
148
` updateWithPartial ` is available as an alternative.
149
149
150
150
The original document ` ref ` is also available, in case you need functionality
151
- that is not covered by this library, or you need to call ` update ` untyped .
151
+ that is not covered by this library.
152
152
153
153
``` ts
154
154
export type FsMutableDocument <T > = {
@@ -168,20 +168,19 @@ for more info.
168
168
## Client-Side Mutations
169
169
170
170
In my projects I prefer to have all mutations happen on the server-side via an
171
- API call, so you might want to consider that, especially if older versions of
172
- your app could be around for a while like with mobile apps, because a bug in
173
- client-side code could have lasting effects on the consistency of your data , and
171
+ API call. You might want to consider that, especially if older versions of your
172
+ app could be around for a while, like with mobile apps. A bug in client-side
173
+ code could have lasting effects on the consistency of your database , and
174
174
time-consuming to have to work around.
175
175
176
- Facilitating client-side writes in a safe way also requires you to write lots of
177
- database rules for your Firestore documents, which can get very complex, so
178
- mutating documents server-side is not only easier to reason about but also more
179
- secure by default.
176
+ Facilitating client-side writes in a safe way also requires writing database
177
+ rules for your documents, which can get very complex, so mutating documents
178
+ server-side is not only easier to reason about but also more secure by default.
180
179
181
180
## Throwing Errors
182
181
183
- The hooks in this library throw errors, which is not a common practice, but this
184
- was a deliberate choice.
182
+ The hooks in this library throw errors, instead of returning them, which is not
183
+ common practice, but this was a deliberate choice.
185
184
186
185
In my experience, runtime exceptions for Firestore documents and collection
187
186
queries are very rare. By throwing we can avoid having to handle errors, and
0 commit comments