Closed johannes-lindgren closed 1 year ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
plugin-sandbox | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | May 19, 2023 8:26am |
Issue: EXT-1558
What?
setContent
andsetModalOpen
now accept updater functions as arguments.Why?
In React and other frameworks with batched updates, unless you update a state with an updater function, multiple calls to
setState
will result in only a single update, because the latter updates overwrite the previous ones.The same thing can happen in a field plugin with
setContent
andsetModalOpen
.How to test? (optional)
Run the demo and try out the new button "IncrementTwice".
(The background is being fixed in #205)