Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This is really cool! But how are conflicts handled?


As far as the server itself is concerned, it’s just a broadcast channel with replay and compaction capabilities, so it’s not directly concerned with conflict resolution. You could use it as a broadcast channel for CRDTs if you wanted to.

The useSharedState react hook is more opinionated, it uses last-write-wins semantics in the case of a conflict. The useSharedReducer hook’s behavior on conflict is up to the reducer provided.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: