Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

README.md

useMedia

The useMedia hook is a simple helper to quickly get something from the WordPress Media Library. It accepts the id of the media element as it's only parameter and returns an object containing the media object itself (media), whether it is still loading (isResolvingMedia), and whether it has finished resolving (hasResolvedMedia).

Usage

@todo paste link to working demo here; probably on documentation site

Original Code

https://github.com/10up/block-components/tree/develop/hooks/use-media