~firefoxreact-appvite-appsrccomponents
3 itemsDownload ./*

..
Counter.tsx
MousePosition.tsx
WindowSize.tsx


componentsWindowSize.tsx
514 B• 4•  3 days ago•  DownloadRawClose
3 days ago•  4

{}
import React from 'react';
import { useAppSelector } from '../redux/hooks';
import { useWindowSize } from '../redux/hooks/useWindowSize';

const WindowSize: React.FC = () => {
  // Use the custom hook to handle resize events
  useWindowSize();

  // Select window size from Redux store
  const { width, height } = useAppSelector((state) => state.windowSize);

  return (
    <>
      <p>
      [Window Resolution;  
      Width: {width}px Height: {height}px]
      </p>
    </>
  );
};

export default WindowSize;

Top
©twily.info 2013 - 2025
twily at twily dot info



2 274 611 visits
... ^ v