Gutenberg get Device Type in Editor

const { deviceType } = useSelect( select => {
        const { __experimentalGetPreviewDeviceType } = select( 'core/edit-post' );
        return {
            deviceType: __experimentalGetPreviewDeviceType(),
        }
    }, [] );