Occasional error from React Query about structural sharing

オープン
#71 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
react, typescript
領域
frontend

調査の方向性

このリポジトリでの useSingleProject() の使用箇所から始め、そのプロジェクトクライアントが React Query の structural sharing にどのように到達するかを追跡します。次に、rpc-reflector のプロキシ動作と、リンクされている React Query の structural sharing に関するドキュメントを調査します。断続的に発生するシリアライズエラーが解消され、意図された structural sharing の動作が維持されるか、必要な設定が明確に確立されれば完了です。

索引モデルが issue の本文から書いたものです。

説明

Example message:

Structural sharing requires data to be JSON serializable. 

To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [["@comapeo/core-react","projects","rjncq9zpqhfu1jstk44xo4qtfc3j9kuri9der8b77qtfco3tkomy"]]: 

Error: ReferenceError: Symbol(Symbol.toStringTag) is not defined

This is coming from the usage of useSingleProject() which returns a "project client", which is a proxy instance that is created via https://github.com/digidem/rpc-reflector/.

I think it's ideal to have structural sharing enabled (docs), which allows React Query to keep the reference the same between re-renders, but maybe there's a detail I'm not understanding that allows us to disable it.

If possible, this probably would be better off with a fix in rpc-reflector as oppose to something here.

主要言語
TypeScript
スター
1
フォーク
1
平均マージ
21分
マージ済み PR(30日)
4

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

digidem/comapeo-core-react のほかの issue

digidem/comapeo-core-react の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。