Skip to content

Conversation

@Shahidullah-Muffakir
Copy link
Contributor

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!

@sudheerj
Copy link
Owner

Thank you for PR. Can you remove additional blank lines and add class example in the collapse after the functional component example

@Shahidullah-Muffakir
Copy link
Contributor Author

Okay sure, I will update it.

@Shahidullah-Muffakir Shahidullah-Muffakir force-pushed the refactor/class-to-functional-components branch from e314fbb to cb5e043 Compare March 13, 2023 09:09
@sudheerj sudheerj merged commit 68b430f into sudheerj:master Mar 14, 2023
@sudheerj
Copy link
Owner

Thanks @Shahidullah-Muffakir for PR

AndriiKatsarskyi added a commit to AndriiKatsarskyi/reactjs-interview-Q-A that referenced this pull request May 16, 2025
…ass-to-functional-components converted the example used in question no.100 from class to functional component
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants