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.

Issue with Typescript and `withMobileDialog`

See original GitHub issue

Trying to use Dialog with the withMobileDialog HOC in Typescript results in an ugly Typescript error

  • This is not a v0.x issue.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Here’s the codesandbox: https://codesandbox.io/s/j403mnwyov

…and in the code sandbox (along with Atom, locally), I get this error: Screen Shot 2019-04-22 at 4 22 58 PM

The codesandbox is fairly bare-bones, so I don’t think I’m doing anything wrong (though I’m still pretty new to Typescript, so who knows?)

Any help is appreciated. Thanks!

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
bmueller-sykescommented, Apr 23, 2019

Okay, so in my defense here, what I illustrated is a “bug”, given that I’m using MUI 3.9.3, and @eps1lon, the example you provided (thanks for that!) is from the next branch, which is not production-ready yet (though it looks like it might be released in May 2019, which would be nice).

Also, FWIW, withMobileDialog works just fine in JS, just not TS in 3.9.3

0reactions
bmueller-sykescommented, Jul 18, 2019

@martisj thanks for this. The problem was that I was using the prior version of Material UI, but everything works great in the latest version.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Issue with Typescript and withMobileDialog #15448 - GitHub
Trying to use Dialog with the withMobileDialog HOC in Typescript results in an ugly Typescript error This is not a v0.x issue.
Read more >
How to use Material-UI withMobileDialog HOC in TypeScript?
I'm having trouble using withMobileDialog in TypeScript. Here's my code, based on the code sample in the docs. import withMobileDialog, { ...
Read more >
Breaking changes in v5, part two: core components - Material UI
This is a reference guide to all of the breaking changes introduced in Material v5, and how to handle them when migrating from...
Read more >
Documentation - TypeScript 3.9
What About the awaited Type? If you've been following our issue tracker and design meeting notes, you might be aware of some work...
Read more >
How to use Material-UI withMobileDialog HOC in TypeScript?
Coding example for the question How to use Material-UI withMobileDialog HOC in TypeScript?-Reactjs.
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