-
Notifications
You must be signed in to change notification settings - Fork 95
feat: introduce useIsMobile and useIsFullscreen composables
#4761
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
feat: introduce useIsMobile and useIsFullscreen composables
#4761
Conversation
|
P.S. It was originally discussed in #4758 |
|
@ShGKme Awesome, thanks a lot. Works well! |
susnux
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Finally got some time for testing: Works nicely 🚀
|
BTW for the tests you need to adjust the import in |
f7d177d to
353bc49
Compare
|
@ShGKme I rebased and adjusted the tests of |
|
@ShGKme Can we go ahead here? I didn't want to merge your PR without you agreeing to it 😉 |
Signed-off-by: Grigorii K. Shartsev <[email protected]>
Signed-off-by: Grigorii K. Shartsev <[email protected]>
Signed-off-by: Grigorii K. Shartsev <[email protected]>
Signed-off-by: Raimund Schlüßler <[email protected]>
353bc49 to
6237954
Compare
Both composables store and return reactive state in module-scope (aka global) and are updated on resize.
Old mixins are now using new composables and are marked
deprecated.Fully compatible with Vue 3
Usage example in Options API:
🚧 Tasks
useIsMobilecomposable, that stores and returnsisMobilestate in module-scope (aka global)isMobilemixin to use new composable and mark deprecatedisFullscreen🏁 Checklist