Skip to content

Commit ff2b51a

Browse files
authored
docs: Mention query keys needs to be serializable using JSON.stringify (#9204)
This was not clear to me and so maybe a useful addition to the docs
1 parent 982f6ca commit ff2b51a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/framework/react/guides/query-keys.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ id: query-keys
33
title: Query Keys
44
---
55

6-
At its core, TanStack Query manages query caching for you based on query keys. Query keys have to be an Array at the top level, and can be as simple as an Array with a single string, or as complex as an array of many strings and nested objects. As long as the query key is serializable, and **unique to the query's data**, you can use it!
6+
At its core, TanStack Query manages query caching for you based on query keys. Query keys have to be an Array at the top level, and can be as simple as an Array with a single string, or as complex as an array of many strings and nested objects. As long as the query key is serializable using `JSON.stringify`, and **unique to the query's data**, you can use it!
77

88
## Simple Query Keys
99

0 commit comments

Comments
 (0)