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

feat: useRead #29

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

feat: useRead #29

wants to merge 4 commits into from

Conversation

puppybits
Copy link

Description

added useRead and useCache hooks

Check List

If not relevant to pull request, check off as complete

  • All tests passing
  • Docs updated with any changes or examples if applicable
  • Added tests to ensure new feature(s) work properly

Relevant Issues

Copy link
Member

@comlaterra comlaterra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥 🔥 🔥 Just some questions.
Looks awesome!

src/hooks/useRead.js Outdated Show resolved Hide resolved
index.d.ts Outdated Show resolved Hide resolved
index.d.ts Outdated Show resolved Hide resolved
function useRead<Doc extends PathId>(
query: Omit<ReadQuery, 'id'>,
alias: '::alias',
): string;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
): string;
): string | string[];

src/hooks/useRead.js Outdated Show resolved Hide resolved
index.d.ts Outdated Show resolved Hide resolved
src/hooks/useRead.js Show resolved Hide resolved
src/hooks/useRead.js Show resolved Hide resolved
src/hooks/useCache.js Show resolved Hide resolved
Copy link

@ralphiz ralphiz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice documentation and I like that there are code samples we can follow!

index.d.ts Outdated Show resolved Hide resolved
src/hooks/useRead.js Outdated Show resolved Hide resolved
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.

6 participants