Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Break out liveQuery() #1244

Closed
wants to merge 8 commits into from
Closed

Break out liveQuery() #1244

wants to merge 8 commits into from

Conversation

dfahlander
Copy link
Collaborator

@dfahlander dfahlander commented Mar 5, 2021

My try to break out liveQuery() from dexie into its own library and let it emit Rx observables.

Vision with this PR:

  1. Publish a new dexie@3.1.0-beta.x and base live-query package on that version of dexie.
  2. Publish the new library and test it
  3. Remove Observable, Subscription and liveQuery from dexie along with the test-live-query.
  4. Make dexie-react-hooks dependent on the new library and import { liveQUery } from it instead of dexie.

Why:

  • Better to base our observables on existing library (rxjs) than letting Dexie come with an Observable type.
  • Don't want to make dexie dependent on rxjs itself. But ok to make a new library dependent on it.

Where I am:
1. Copied structure from addons/dexie-export-import
2. Copied live-query.ts into this library but changed it to be based on rxjs. I got the liveQuery.ts not showing any typescript error in vscode at least.
3. Tried to compile but get errors when trying to rollup dexie!

TODO:
* Check why not even dexie compiles anymore.
* Try make it build live-query/src and rollup and all.
* Try make it build live-query/test and run the tests.
@dfahlander dfahlander changed the title Break out live query Break out liveQuery() Mar 5, 2021
@dfahlander
Copy link
Collaborator Author

Dexie 3.2.0 will keep having liveQuery() built-in. Closing this PR.

@dfahlander dfahlander closed this Sep 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant