lukemorales / query-key-factory

A library for creating typesafe standardized query keys, useful for cache management in @tanstack/query
https://www.npmjs.com/package/@lukemorales/query-key-factory
MIT License
1.23k stars 32 forks source link

docs: update example usage in README #7

Closed Shajansheriff closed 2 years ago

Shajansheriff commented 2 years ago

Issue: In the readme, the example in line 125 was confusing and misleading. As per the example factor filter: ({ filter, status, limit }: FilterOptions) => [filter, status, limit], but in the call todosKeys.filter('not-owned-by-me', 'done', 15); which is a mistake.

Solution: I have verified test case and the usage https://github.com/lukemorales/query-key-factory/blob/8278ce5dcade451ee4736a1108493efc4866e947/src/create-query-keys.spec.ts#L131

It feels like a simple typo mistake.

lukemorales commented 2 years ago

@Shajansheriff thanks for noticing the typo and correcting it! Can you just adjust you PR so it matches the conventional commits convention and put a more descriptive message?

Shajansheriff commented 2 years ago

Thanks @lukemorales