Comments (5)
Fixed in 0.5.0
from react-media-query-hoc.
Good point - no need for the extra div
Using React.Children.only
sounds good, I can update this once I get a spare few mins - otherwise feel free to throw up a PR
from react-media-query-hoc.
I would like to point out that this change would introduce a BC break because React.Children.only
throws if there is more than 1 child element, while instead it would have worked
from react-media-query-hoc.
I think the ideal solution is to use React fragments: https://reactjs.org/blog/2017/11/28/react-v16.2.0-fragment-support.html
Maybe best to wait for react 16 to be mainstream before this is put in - so this lib still works on React 15
from react-media-query-hoc.
FYI, my PR fixes this: #12
It does not fix the problem with React 15, though. It just adds support for Fragments.
from react-media-query-hoc.
Related Issues (14)
- Allow passing of values to matchmedia for Server Side Rendering HOT 1
- Context is not updated when state changes HOT 1
- Use latest React createContext HOT 10
- Move to latest React, enzyme and babel HOT 1
- Add e2e test framework HOT 2
- Setup with nwb
- State being updated on window resize, context isn't. HOT 5
- Changelog for v1.0 ? HOT 1
- Add CI to the repo
- withMedia hoc can cause jumpy behaviour HOT 2
- Update to Babel 7
- Fix Travis badge
- Setup semantic release
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 react-media-query-hoc.