Site icon Hip-Hop Website Design and Development

Gutenberg: Methods to Change Put up Standing Programmatically?

I’m writing a plugin for the Gutenberg editor.

I understand how to make use of editPost() to vary e.g. some meta-values:

editPost( {
    meta: {
         myMeta: 'new meta worth goes right here'
    }
} );

That is working advantageous.

However when I attempt to change the publish standing, e.g. I need to unpublish a publish:

editPost( {
    standing: 'draft' // <-- this doesn't work
} );

There are a number of different features, equivalent to savePost() or trashPost(). I couldn’t discover something to publish or unpublish a publish.

How can I modify the publish standing inside a customized Gutenberg-plugin?