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

Better vue integration #18

Merged
merged 7 commits into from
Apr 28, 2024
Merged

Better vue integration #18

merged 7 commits into from
Apr 28, 2024

Conversation

SaraVieira
Copy link
Contributor

@SaraVieira SaraVieira commented Apr 27, 2024

  • Tracks changes in any params passed to it
  • Improves types
  • Allows user to pass refs, strings or getters as values
  • removes unused deps
  • adds yarn dev command that watches all the files

Usage:

import { useSearch } from "@oramacloud/client/vue";
import { ref } from "vue";

const term = ref("");
const limit = ref(50);
const { results } = useSearch({
  cloudConfig: {
    endpoint: "https://cloud.orama.run/v1/indexes/ps1-pal-xoine7",
    api_key: "lyJKdJUUWjIhQWg9AkiwRpRoaDpW3QL4",
  },
  term: () => term.value,
  limit,
});

Example: https://orama-vue-client.surge.sh/

@SaraVieira SaraVieira merged commit 737dc51 into main Apr 28, 2024
1 check passed
@SaraVieira SaraVieira deleted the better-vue branch April 28, 2024 10:06
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.

2 participants