How do I get the current post ID within a Gutenberg/Block Editor block?
I would like to access the current post ID from within a block. According to this documentation page, it seems like I should be able to get the post ID with:
wp.data.getCurrentPostId(); // or wp.data.withSelect('core/editor').getCurrentPostId(); // or wp.editor.getCurrentPostId();
but none of those are correct.