I've converted the class component used in Question No. 100 to a functional component using React hooks. I updated the state management to use the useState hook to track the window size, and used the useEffect hook to add and remove a window resize event listener. The component now correctly displays the current window size in the UI.
Thanks!
Hi there!
I've converted the class component used in Question No. 100 to a functional component using React hooks. I updated the state management to use the useState hook to track the window size, and used the useEffect hook to add and remove a window resize event listener. The component now correctly displays the current window size in the UI. Thanks!