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.

Interface 'IMidiPermissionDescriptor' incorrectly extends interface 'PermissionDescriptor'

See original GitHub issue

What is the current behavior? image image image image

Steps to reproduce it and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn’t have extra dependencies other than react-use. Paste the link to your JSFiddle or CodeSandbox example below:

What is the expected behavior?

A little about versions:

  • OS:
  • Browser (vendor and version):
  • React:
  • react-use:
  • Did this worked in the previous package version?

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:14
  • Comments:16

github_iconTop GitHub Comments

8reactions
sidhukocommented, Nov 16, 2021

As a workaround to this you can change your imports to direct imports:

// @deprecated author doesn't maintain react-use actively.
// use @react-hookz/web instead
import useKey from 'react-use/lib/useKey';
import useDebounce from 'react-use/lib/useDebounce';
import useClickAway from 'react-use/lib/useClickAway';
import useTimeoutFn from 'react-use/lib/useTimeoutFn';
import useEffectOnce from 'react-use/lib/useEffectOnce';
import useWindowSize from 'react-use/lib/useWindowSize';
import usePreviousDistinct from 'react-use/lib/usePreviousDistinct';

export { useKey, useDebounce, useClickAway, useTimeoutFn, useEffectOnce, useWindowSize, usePreviousDistinct };

As long as you’re not using usePermission you can stop the build issue. You can migrate to new library as they become available or start to write your own replacements.

1reaction
JoeDunckocommented, Sep 2, 2021

Hi! @react-hookz/web, the new library by one of react-use’s former maintainers (background here and here) has resolved this outstanding type issue. It might be worth taking a look.

For those interested, there’s an official migration guide for migrating from react-use to @react-hookz/web.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Interface incorrectly extends interface - Stack Overflow
In typescript playground (click) everything seems to be okay. What is it happening? Typescript version: 2.4.2. typescript · interface.
Read more >
How to Easily Extend Interfaces in TypeScript - Webtips
Learn how you can extend your interfaces in TypeScript with other ... error: // Interface 'Employee' incorrectly extends interface 'Person'.
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