Giter Site home page Giter Site logo

mobx-react-matchmedia's People

Contributors

foxhound87 avatar greenkeeperio-bot avatar pdfowler avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

mobx-react-matchmedia's Issues

Fragment instead of div

hello,
can you support choosing the type of the wrapper div, to be something custom? like Fragment or span ?
thank you

bug: nested components doesn't work

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.

React PropTypes warning

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.

SSR doesnt seem to be working

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

prop-types package warning from latest React.

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.

Transaction

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.