preactjs / preactjs/preact-devtools
When compoonent overwrites the state then the state which is rendered does not match the state I see in devtools
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 345
- Forks
- 39
- PR merge metrics
- No merged PRs in 30d
Description
When I change the state in the devtools but the component has getDerivedStateFromProps which overwrites it, then the state which is rendered does not match the state I see in devtools. This is confusing.
It would be best if devtoools could refresh the component state after the component rendered.
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
Reproduce the mismatch in the Preact devtools by editing a component's state when it uses getDerivedStateFromProps, then compare the rendered state with the state shown in devtools. Trace the refresh timing around component rendering; done means the displayed state matches the state after the component has rendered.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100