Wednesday, November 23, 2022
HomeWordPress Developmentblock editor - The right way to use isSavingNonPostEntityChanges in the identical...

block editor – The right way to use isSavingNonPostEntityChanges in the identical scope appropriately?


I acquired this piece of code to refresh a server-side-render mechanically. It really works! Supply: https://github.com/WordPress/gutenberg/discussions/45205#discussioncomment-3933656 However after I run jslint I get the error:

error ‘isSavingNonPostEntityChanges’ is already declared within the higher
scope on line 34 column 20

const { isSaving, isSavingNonPostEntityChanges } = useSelect(
        ( choose ) => {
            const { isSavingPost, isSavingNonPostEntityChanges } =
                choose( editorStore );
            return {
                isSaving: isSavingPost(),
                isSavingNonPostEntityChanges: isSavingNonPostEntityChanges(),
            };
        }
    );

Do you will have any thought resolve that? I might quite not use it like this.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments