josemaenzo
Still don't like the extra naming that you have to think of for every atom/value. Or also the key: prop that you have to define for every atom. It seems redundant for me.
And also, as a bundle-phobia guy I am. I think 22kb as extra library is ok but it could be better.
Liking a lot Recoil as solution for the three-button problem. I still think that the patch pattern I use with dop is better. In terms of simplicity and extra KB. This is the same example https://codesandbox.io/s/react-dop-nhj0j?file=/store.js
But I guess I say that because I'm the creator of dop. So I'm so open to critics :)
If not, any paper or doc that explain how to implement it with gun?
Let's say our state have an array like ['a','b'].
What about if Peer-A splice the first element (0) which results in ['b'] and Peer-B wants to mutate 'a' to 'A' which results in ['A','b'] and they both make the mutation at the same millisecond?
The cartoon explanation do not tackle those terms.
For example, one peer change a property value and the other peer deletes it.
You are right, is not a library that provides a way to resolve sync conflicts. Consensus algorithms is a difficult topic, and I haven't seen an approach in JavaScript that resolve this problem. Maybe gun, but I haven't tried.
If you just need client-server architecture with reactivity, why don't you give a try to dop?
Also you decide what to do when a client call a specific function: https://github.com/DistributedObjectProtocol/web/blob/master...
Is the responsibility of the implementation to apply the patches/mutations in the correct order of the version.
If you are familiar with state management libraries such a Redux, Mobx, etc. Dop is more or less the same. With the difference that the initial state of your app can be initialized in the server.
I have to work better explaining this.