React Hook “useState” cannot be called inside a callback. Using useMediaQuery responsive JS media query
What you’ve done here is writing a custom hook(useMediaQuery). You’ve done that properly so no issues there. Above code snipped is fine. The problem is in the index.tsx file when …