WatermelonDB icon indicating copy to clipboard operation
WatermelonDB copied to clipboard

Contribution for Vue withObservables recipe

Open 509dave16 opened this issue 4 years ago • 9 comments

Hey, @radex !

Recently I developed a modified version of withObservables that works with Vue.js. I'm wondering how this should be integrated into the WatermelonDB ecosystem.

I have made a codesandbox that is just a rough simple demonstration using some of the web example data generation. You want to look at the components/containers" folder at withObservables.js" and "Forwarding.js".

https://codesandbox.io/s/34cjw?file=/src/components/containers/withObservables/withObservables.js

509dave16 avatar Jul 21 '20 02:07 509dave16

So cool @509dave16 !! ❤️ I have zero experience with Vue.js, so it's going to be difficult for me to judge the quality/correctness of the code (I know that for React, it's much trickier than it appears at first glance and it's easy to introduce subtle bugs). But I'm very much interested in spreading WatermelonDB further, so what I'm thinking is this:

  • deprecate the @nozbe/withObservables package (in theory, it's useful without WatermelonDB, but I think there are 0 people using it this way), and pull it into WatermelonDB like so: `import {withObservables} from '@nozbe/watermelondb/react'
  • Add vue/ to WatermelonDB and add Vue.js-related helpers (maintained by the community, as, again, I have no experience with Vue)
  • Mention in Readme that WatermelonDB is compatible with Vue and write a tiny chapter in the documentation about it (if your withObservables is modified from the original, then much of the syntax and usage examples will be the same, just the way you integrate it into your views is different, so it should be easy).

My only concern is that if there's no one else but you using it, then the withObservables in the main codebase will eventually stop working and there will be no one to fix it...

radex avatar Jul 21 '20 10:07 radex

@radex I agree with your concern about the maintenance of the Vue implementation of withObservables. I'm almost wondering if I should just fork @nozbe/withObservables, releasing a separate npm package named something like @509dave16/vue/withObservables. And then in the WatermelonDB docs we could reference it under a 2. Learn to use Watermelon section for tentative Vue support called 2.X BETA: Connecting to Vue Components. Or under 5. Other we could have a 5.X Community or 5.X Ecosystem section page in which we could reference connecting to Vue components using @509dave16/vue/withObservables.

509dave16 avatar Jul 21 '20 14:07 509dave16

@509dave16 Yep, that works for me. Something like withObservables really doesn't need to be updated or maintained very often, so you releasing it under your own name would not be a big maintenance problem in terms of Watermelon changes, but would be easier for you to manage. But still I could include docs about it in the mainline for easier discovery.

radex avatar Jul 21 '20 14:07 radex

@509dave16 Hi! Is there any progress on this project?

radex avatar Sep 17 '20 13:09 radex

@radex Apologies for the radio silence on this issue. I was originally ramping up on Vue to impress an employer I had applied to. But then I got a new job elsewhere only to be dumped by that employer after 1 week because they changed their mind on what they wanted the role to be. So now I'm in the heat of the job hunt unemployed currently.

However I think I might have the opportunity soon while I'm unemployed to go back and get this published. Really appreciate you reaching out as a reminder!

509dave16 avatar Sep 17 '20 14:09 509dave16

@509dave16 Understood. Good luck with everything, and if you manage to get something working with the Vue recipe, i'm looking forward to that!

radex avatar Sep 17 '20 14:09 radex

Any update ?

Zenthae avatar Oct 31 '20 22:10 Zenthae

I'm about to start a project using vue and was wondering if this has gone any further? Cheers

7ammer avatar Jul 05 '21 21:07 7ammer

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

stale[bot] avatar Apr 16 '22 17:04 stale[bot]