Created
August 30, 2021 12:21
-
-
Save Mamaduka/3f7b58514e0169cfdcced845cf20affe to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { posts, isLoading } = useSelect( ( select ) => { | |
const { getEntityRecords, isResolving } = select( 'core' ); | |
return { | |
posts: getEntityRecords( 'postType', 'post' ), | |
isLoading: isResolving( 'getEntityRecords', [ 'postType', 'post' ] ), | |
}; | |
}, [] ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment