fix: Adding GeoJSON object to payload with useState freezes browsertab
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 3.3k
- Forks
- 214
- Avg merge
- 13h 22m
- Merged PRs (30d)
- 18
Description
🐛 The bug
In my application I'm storing some GeoJSON object with useState. I've been experiencing some freezes while developing my application. After some while I noticed they only occurred when de nuxt dev tools are open.
To reproduce in the stackblitz:
- Open the dev tools
- Go the payload panel
- Click addData
- The preview frame freezes
In my own application: When I pause script execution in the frozen tab, it seems triggerRef in the handler onUpdateReactivity is being called over and over again.
In the stackblitz I did not find a way to pause the script execution and get meaningful information
🛠️ To reproduce
https://stackblitz.com/edit/github-fkhjhv4b?file=app%2Fapp.vue
🌈 Expected behavior
Adding an GeoJSON to my state while the devtools are open will not freeze the tab
ℹ️ Additional context
No response
Contributor guide
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
Start with packages/devtools-kit/src/runtime/iframe-client.ts, focusing on the onUpdateReactivity handler and its triggerRef call. Reproduce the freeze using the linked StackBlitz by opening the devtools payload panel and clicking addData. Done means adding the GeoJSON object to useState no longer freezes the preview frame while devtools are open.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nuxt, typescript
- Domain
- developer-experience, devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100