Switch from relying directly on Replicache to an interface.#35
Conversation
This makes it easier to use with Reflect.
| "react": ">=16.0 <18.0", | ||
| "react-dom": ">=16.0 <18.0", | ||
| "replicache": ">= 10.0.0", | ||
| "replicache": "10.0.0", |
There was a problem hiding this comment.
I would expect this to be ^10.0.0
There was a problem hiding this comment.
Well here's the way I think of it -- we're not actually relying on a particular version . This code is basically do the same thing as the Go pattern of having consumers declare the interfaces for their dependencies, except that in this case the interface is so complex (ReadTransaction) that I'm borrowing the definition in Replicache 10. I could actually pick any version of Replicache that has an interface that is compatible with what useSubscribe is trying to do. I sort of arbitrarily picked 10.
There was a problem hiding this comment.
I agree.
I was just commenting on locking the version like this. Generally you'd want to use semver.
)" This reverts commit 3ee3fbe. I'm putting this back the way it was. In retrospect, this way of doing it seems more consistent with the JS ecosystem. The package should specify the versions it has been tested and known to work with explicitly.
This makes it easier to use with Reflect.