Comments (3)
Although this issue may have been resolved by now, it looks like the problem is due to using the useBreakpoint function before wrapping it with the Provider.
If you implement it like in https://codesandbox.io/s/hooks-api-emotion-forked-w5dbjb?file=/src/app.tsx, it should work properly.
By the way, I agree that it would be great if a function like createUseBreakpoint were exposed. 😃
I'm curious if there has been any progress or plans for changes regarding this issue. @mg901
from styled-breakpoints.
@vivekjain202, hi! Thank you for your question and interest for Styled Breakpoints. Unfortunately, At the moment I don't have enough time to give full answers. Due to the fact that Russia attacked Ukraine. I, as a citizen of Russia who does not support this barbarity, decided to leave my home. Now all my time is spent on learning more English and solving algorithmic problems. I urgently need to find a country where I can feel safe and think about the future.
If answer your question.
I rewrote his and it is at the link.
from styled-breakpoints.
@vivekjain202 What problem do you think the function createUseBreakpoint
will solve? Can you show me examples?
from styled-breakpoints.
Related Issues (20)
- next: replace `createTheme` with `createStyledBreakpointsTheme`
- next: add strict types for functions for `theme`
- bug(up): `0px` cannot be assigned as minimum breakpoint
- revert to v11.1.2
- feat(down): add validation for last breakpoint HOT 2
- refactor(core): validation
- refactor(core): need to rewrite using the object composition approach
- fix(down): passing the last breakpoint should not throw an exception
- fix(between): remove incorrect validation for the minimum value
- fix(only): remove incorrect validation for the minimum breakpoint
- refactor(core): need to remove remove `Object.entries` in `throwIfInvalidBreakpoints` function
- ci(gh-actions): add alpha & beta branches to the release.yml
- next: rewrite breakpoints HOT 1
- next: remove functions up, down, between, only from external api
- Customizing breakpoints throws undefined error HOT 1
- docs: Need to reorganize the documentation structure
- docs: remove legacy types
- docs: add latest version
- Cannot find module 'styled-breakpoints/use-media-query' HOT 3
- How to configure breaking points for multiple themes? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from styled-breakpoints.