# UI panel with React \`useEffect\` hook can't call \`editDocument\`

**URL:** <https://forums.creativeclouddeveloper.com/t/ui-panel-with-react-useeffect-hook-cant-call-editdocument/1872>\
**Category:** UXP Plugin API\
**Tags:** react, ui\
**Created:** [June 26, 2020, 2:49am UTC](https://forums.creativeclouddeveloper.com/t/ui-panel-with-react-useeffect-hook-cant-call-editdocument/1872 "2020-06-26T02:49:06Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![pklaschka](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/pklaschka/32/3162_2.png) [@pklaschka](https://forums.creativeclouddeveloper.com/u/pklaschka)\
**Post date:** [July 7, 2020, 9:53am UTC](https://forums.creativeclouddeveloper.com/t/ui-panel-with-react-useeffect-hook-cant-call-editdocument/1872/9 "2020-07-07T09:53:19Z")

</div>

> [@cpryland](#):
>
> It wouldn’t be too hard, given an async `editDocument()` -called function. It can just await a promise that only fulfills when some input “settles down.”

Unfortunately, `editDocument()` locks the UI until resolved (cf. my comment at [Debouncing input events in panels - #7 by pklaschka](http://forums.creativeclouddeveloper.com/t/debouncing-input-events-in-panels/1170/7))…

---

_[View the full topic](https://forums.creativeclouddeveloper.com/t/ui-panel-with-react-useeffect-hook-cant-call-editdocument/1872)._
