lukemorales / query-key-factory

A library for creating typesafe standardized query keys, useful for cache management in @tanstack/query

Home Page:https://www.npmjs.com/package/@lukemorales/query-key-factory

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issues with React Query Devtools

JosipVuk opened this issue Β· comments

Hey πŸ‘‹ ,
first of all, thank you for creating this awesome lib πŸ™ I have problems using it with @tanstack/react-query-devtools.

Here is an example from stack blitz, where you can reproduce the error: https://stackblitz.com/edit/nextjs-nsf8wi?file=pages/index.js

Steps to reproduce the error:

  1. Open query dev tools in the UI
  2. Click on the stringKey query -> all works fine as this query key was not created with this lib
  3. Click on the queryFactoryKey query -> whole UI breaks with throw error TypeError: 'get' on proxy: property 'prototype' is a read-only and non-configurable data property on the proxy target but the proxy did not return its actual value (expected '[object Array]' but got '[object Array]')

For me (and probably many more devs) React Query Devtools are essential when using React Query, so this error is blocking me from using this awesome lib 😞

Hey @JosipVuk thank you so much for opening this issue and with a reproducible error πŸ™ŒπŸ»
I was not aware that this was breaking in devtools, I'll try to debug and release a fix asap

@JosipVuk just a heads up, that v0.6.1 has been released with the fix

@lukemorales thx, I tried it out locally with the new version and I can confirm it works 🎊