preactjs / preactjs/preact-devtools

Inspecting Suspense boundaries created by `preact-iso` throws error due to missing component state

Open
#502 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
345
Forks
39
PR merge metrics
No merged PRs in 30d

Description

(Writing this largely for future Ryan as I don't have time to look into it just yet)

Running into the following when trying to use the extension (in both FF & Chrome) on the Preact site, upon inspecting suspense boundaries or their children:

Uncaught TypeError: right-hand side of 'in' should be an object, got undefined

https://github.com/preactjs/preact-devtools/blob/2e2c47a7809127ecf66265d5a1f0109a5ab5e715/src/adapter/10/bindings.ts#L250

It looks like <ErrorBoundary> & <Router> from preact-iso are the culprits; the former wraps just about everything, but when removed, reduces the error to only when inspecting children of the <Router>'s suspense boundary.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at src/adapter/10/bindings.ts around line 250 and reproduce the error in the Preact site while inspecting Suspense boundaries and their children. Compare cases involving preact-iso's ErrorBoundary and Router; done means inspection no longer throws when those boundaries are present.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.