# ghostkit/3.3.3/gutenberg/hooks/use-responsive.js

Block Animations, Motion &amp; Scroll Effects – Ghost Kit, version 3.3.3. 24 lines.

- Page: https://pluginprobe.com/plugins/ghostkit/3.3.3/code/gutenberg/hooks/use-responsive.js
- Raw: https://pluginprobe.com/plugins/ghostkit/3.3.3/raw/gutenberg/hooks/use-responsive.js
- Modified: 2024-02-18T18:40:24+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/ghostkit/3.3.3/code/gutenberg/hooks/use-responsive.js#L10-L20`.

```javascript
import { useDispatch, useSelect } from '@wordpress/data';

const { ghostkitVariables } = window;

const allDevices = { ...ghostkitVariables.media_sizes };

export default function useResponsive() {
	const { device } = useSelect((select) => {
		const { getDevice } = select('ghostkit/responsive');

		return {
			device: getDevice(),
		};
	});

	const { setDevice } = useDispatch('ghostkit/responsive');

	return {
		device,
		setDevice,
		allDevices,
	};
}

```
