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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: able to configure fetchKey with useFetch hook #527

Open
DanSnow opened this issue Aug 10, 2021 · 0 comments
Open

feat: able to configure fetchKey with useFetch hook #527

DanSnow opened this issue Aug 10, 2021 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@DanSnow
Copy link

DanSnow commented Aug 10, 2021

馃啋 Your use case
I have several components which are using fetch hook, and these components may use over 100 times in total on a page. I need to add fetchKey for them so Nuxt can get the correct value. I want to reuse the data in setup hook to generate the fetchKey.

馃啎 The solution you'd like
Describe what you want to happen.

// this
useFetch(() => {...}, { key: 'foo' })
// and this
useFetch(() => {...}, { key: (getCounter) => `foo:${getCounter('foo')}` })

馃攳 Alternatives you've considered
Have you considered any alternative solutions or features?

鈩癸笍 Additional info
Is there any other context you think would be helpful to know?

@DanSnow DanSnow added the enhancement New feature or request label Aug 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants