preactjs / preactjs/preact-devtools
Display "Context updated" as a rerender reason
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 345
- Forks
- 39
- PR merge metrics
- No merged PRs in 30d
Description
My understanding is that when a component updates because of a context change (e.g. Context.Consumer rerenders), the devtools will show "Force updated" since internally that is how Preact propagates context changes.
It'd be nice if devtools instead could show something like "Context updated" instead, and if using modern context maybe even which context updated (e.g. show the context ID?)
This might be harder to do in V10 but perhaps in v11 we could have a CONTEXT_UPDATE flag that devtools can read to show the correct render reason?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files or tests are named. Start by tracing how devtools identifies and displays rerender reasons for Context.Consumer updates, then determine how a distinct context-update signal could be exposed in the relevant Preact version. Done means context-triggered renders display "Context updated" rather than "Force updated", with the context ID only if the design supports it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100