We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When I build the react app above v18,
import React from 'react'; import ReactDOM from 'react-dom/client'; import App from './App'; import './index.css'; ReactDOM.createRoot(document.getElementById('root')!).render( <React.StrictMode> <App /> </React.StrictMode>, );
It doesn't reactive on resize.
export const useScreenSize = () => { const mobile = useMediaQuery({ maxDeviceWidth: 767, }); const tablet = useMediaQuery({ minDeviceWidth: 768, maxDeviceWidth: 1439, }); const pc = useMediaQuery({ minDeviceWidth: 1440, }); return useMemo(() => ({mobile, tablet, pc}), [mobile, tablet, pc]); };
The text was updated successfully, but these errors were encountered:
Same here, the state doesn't change when resizing
EDIT: For anyone having issues because of React 18, you can try to use ahooks which has a built in hook for responsive
https://ahooks.js.org/hooks/use-responsive/
Sorry, something went wrong.
headlessui
Fixed and published as beta7! Will probably release 9.0.0 as stable if everyone reports that it works fine for them.
Successfully merging a pull request may close this issue.
When I build the react app above v18,
It doesn't reactive on resize.
The text was updated successfully, but these errors were encountered: