instantdb / instant

Instant is a modern Firebase. We make you productive by giving your frontend a real-time database.
https://instantdb.com
Apache License 2.0
6.69k stars 184 forks source link

How to get the state of `db.transact` like `useMutation` in react-query? #11

Open reorx opened 3 months ago

reorx commented 3 months ago

I saw the db.useQuery function, quite good for people who are familiar with react-query, but is there a useMutation equivlent? It seems that db.transact does not return anything stateful.

he-la commented 3 months ago

I second this. See also this Nielsen Norman article on putting errors close to their source. If there's a conflict when replicating, it should be possible to track back all the way to the source(s) of the mutations that caused the conflict.