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.

[withWidth] Provide a hook API

See original GitHub issue

Regarding the Hidden documentation about breakpoints, specifically this code example:

Would it be possible to get a version of this code example using React Hooks instead of recompose/compose? Recompose is being deprecated (basically) with the addition of hooks.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:5
  • Comments:10 (7 by maintainers)

github_iconTop GitHub Comments

3reactions
oliviertassinaricommented, Nov 14, 2018

@Kizmar Hooks aren’t stable yet, they are implemented on an alpha version of React. I think that we can expose a hook API version of our withWidth HOC with an explicit unstable_ prefix.

1reaction
oliviertassinaricommented, Dec 9, 2018

We will kill the @material-ui/core/styles module with v4 for @material-ui/styles. We can add the package as a dependency.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[withWidth] Provide a hook API #13600 - mui/material-ui - GitHub
Regarding the Hidden documentation about breakpoints, specifically this code example: Would it be possible to get a version of this code ...
Read more >
Core - Observable Hooks
React hooks for RxJS Observables. Simple, flexible, testable and performant. ... If no dependencies provided it is identical with useObservable .
Read more >
Developing responsive layouts with React Hooks
We are going to use React Hooks to create an elegant and, more importantly, reusable solution to the problem of creating responsive layouts ......
Read more >
Hooks FAQ - React
Importantly, custom Hooks give you the power to constrain React API if you'd like to type them more strictly in some way. React...
Read more >
useWindowSize React Hook - useHooks
Hooks are a feature in React that allow you use state and other React features ... This hook returns an object containing the...
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