-
Notifications
You must be signed in to change notification settings - Fork 324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace makeResponsive
with useMediaQuery
#3032
Comments
makeBreakpoint
with useMediaQuery
makeResponsive
with useMediaQuery
Hi! Can i take a work on this :) |
@BransonNg sure, thank you! Just leave out Let me know if you have any questions! |
Hi @taneliang, was going through TodayContainer.test.tsx, and am having trouble testing the useEffect cycle as I'm unable to mount or render TodayContainer due to some Link components being rendered outside of a Router component. Any suggestions as to how to test this? Also related to the same test suite, any suggestions for checking the weather state? (i'm unaware of a way to access a component's useState to assert any tests) |
Hey @BransonNg! Sorry for the delay in replies, I'm having In-Camp Training these 2 weeks. Would Regarding the weather test, off the top of my head (I haven't looked at the test or the code yet) maybe we could try one of these approaches:
We can then just assert on the UI contents with a |
oh okay, i will look into that. Thanks @taneliang! Also, would it be possible for me to add this dependency? |
Oh, you can leave out |
useMediaQuery
was added in #3007 to replace themakeResponsive
higher order component. This issue tracks the removal of the deprecatedmakeResponsive
from the codebase.At the time of writing, there are 5 remaining components that use
makeResponsive
, 2 of which are function components. The remaining 3 class components will need to be replaced with function components first (similar to work done in #3007 and #3009).This can be done over multiple PRs depending on your comfort level.
Update: only
TodayContainer
is left.VenuesContainer
too, but that'll be done in #3038.The text was updated successfully, but these errors were encountered: