foxhound87 / mobx-react-matchmedia Goto Github PK
View Code? Open in Web Editor NEWA React HOC with mediaqueries for responsive layout
License: MIT License
A React HOC with mediaqueries for responsive layout
License: MIT License
warning.js:36 Warning: Accessing PropTypes via the main React package is deprecated. Use the prop-types package from npm instead.
Looks like the prop-types package needs to be added for latest React / React 16.
hello,
can you support choosing the type of the wrapper div, to be something custom? like Fragment or span ?
thank you
Right now lib is creating lot of noise in if it used with mobx-react-devtools and with many breakpoints. Good idea would be to update breakpoints using transaction probably - it will invoke one "event" change after all updates.
Thannks for this awesome library! I was trying to look up examples of using matchMedia with mobx and found this. Works as expected, however I'm getting a couple React PropType warnings:
Warning: You are manually calling a React.PropTypes validation function for the `children` prop on `MatchMediaProvider`. This is deprecated and will not work in the next major version. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details.
Same thing with breakpoints
prop on MatchMediaProvider
. I followed the example usage, so I'm not sure if it's just something on my side or not. Looking at your src, I don't see anything that would cause the warning so I'm at a loss.
Hi,
I have a parent component wrapped with MatchMediaProvider, and it has a nested child component also wrapped with MatchMediaProvider.
The inner nested component doesn't work. moreover, it uses the same "breakpoints" of the parent, regardless of what I pass to it in the breakpoints property. even passing empty object, makes it think i used the same breakpoints value of the parent.
Hello,
This library appears to not support SSR. Is this the case?
Using it with NextJs does not work as expected.
And looking over the source I can see that the technique to determine the window width will not work with SSR.
Any plans to add this in the future?
Regards
So that store can be injected into any component and be used from there?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.