question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

v1.10 and v2 umbrella

See original GitHub issue

Update (March 17th, 2019)

As described in detail in #123, I’m seriously considering publishing the current changes under a minor version bump: 1.10. The bulk of the preparations for this have already been done in #123.

The next step would be to implement a v2 which uses hooks for the core functionality. I expect a hooks implementation could simplify some of the internals, and would simultaneously allow us to ship a hook as part of the API.

~2.0~ 1.10

  • change query prop to queries (#72)
  • two-pass render + migrate to componentDidMount (solves #81, #91, #109, PR: #96)
  • run tests in <Strict> mode (#115)
  • merge #123
  • polish the docs (#119)
  • publish a prerelease, and have some people test it out in their production apps

~2.1~ 2.0 (now available as react-media@next)

  • ~implement a hooks API, exposed as react-media/hooks~
  • reimplement the core functionality using hooks, expose a useMedia hook
  • implement a <Media> component, which is compatible with v1.10, but uses said hook internally

I propose exposing Media as the default export and exporting the hook as a named export:

import Media, { useMedia } from 'react-media';

This would allow people to seamlessly upgrade to v2, without having to change existing code. There’s also not really any use in splitting things up, since the Media component will be very small (just a wrapper around the hook), and it will use the hook under the hood. So I don’t expect us splitting up the files will result in significant bundle size savings.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:17
  • Comments:43 (9 by maintainers)

github_iconTop GitHub Comments

4reactions
edorivaicommented, Jan 21, 2019

@South-Paw Hey I just prepared everything for an alpha release, but sadly the deploy process halted due to an invalid npm token. I don’t have access to the npm project, so we’ll have to wait for @mjackson to fix the token in Travis. See #120 for details.

2reactions
edorivaicommented, Mar 16, 2019

@moflo Thanks 😄. We’re planning to add hooks as well, but we first want to get v2 published.

@South-Paw @baumzeit Good news, the deployment problems have been fixed 🎉. You should be able to install react-media@next. Let me know how it goes!

Read more comments on GitHub >

github_iconTop Results From Across the Web

10' x 10' Umbrella w/ Lights
10 ' x 10' double-top canopy with moon & star lights. Mount the rotating base to your deck for permanent/semi-permanent installation.
Read more >
Evolution of Fortnite Umbrellas! (Chapter 1 Season 1 - YouTube
All Fortnite Umbrellas (Season 1 - Season 16)Every Season you can unlock a new free Victory ... (Chapter 1 Season 1 - Chapter...
Read more >
Umbrella Reporting v2 API Overview - Cisco Developer
The Reporting API v1 is a more limited system enabling access to three endpoints. While v1 is simple and secure, the Reporting API...
Read more >
10 Ft Outdoor Patio Umbrella UV Protection - Belleze Furniture
This 10-foot umbrella featuring heavy-duty Polyester is specially designed to keep you cool and more comfortable than a traditional umbrella. ✓ Shop now....
Read more >
Umbrella Cord String 10' - Patio Furniture Rehab
Volume Discounts (Shown in Cart) · 1- $3.25 · 2- $3.00 · 3+ $2.75.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found