How to fetch data from a block : in edit.js
import { useSelect } from '@wordpress/data';
const SomeComponent = ( { attributes, setAttributes } ) => {
const taxonomies = useSelect( select => select( 'core' ).getTaxonomies(), [] );
...
}
Sources :