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.

How do you import this in React?

See original GitHub issue

I use ES6 import import { BackgroundVideo } from "background-video";, it shows error TypeError: Cannot call a class as a function. How can we import this?

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
linnettcommented, Feb 19, 2019

I know how to fix but it’s time. I’ll do my best to find some

On Tue, 19 Feb 2019, 22:22 23twenty <notifications@github.com wrote:

Unfortunately that yeilds the same result. I guess it has to do with how the module is created; I’d love to make a PR but this is honestly not in my wheelhouse. Any work on this would be super appreciated!

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/linnett/backgroundVideo/issues/40#issuecomment-465335267, or mute the thread https://github.com/notifications/unsubscribe-auth/ACI_wefcQ2sv0_3jKq0VOMG3e9LsSCRoks5vPHkbgaJpZM4ZjYyS .

0reactions
kgrosvenorcommented, Oct 14, 2019

Same in VueJS

Read more comments on GitHub >

github_iconTop Results From Across the Web

Importing and Exporting Components - React Docs
Make a new JS file to put the components in. · Export your function component from that file (using either default or named...
Read more >
Importing a Component | Create React App
We suggest that you stick to using default imports and exports when a module only exports a single thing (for example, a component)....
Read more >
ReactJS | Importing and Exporting - GeeksforGeeks
Now, importing is an operation that requires the permission of the module. Importing is possible only if the module or named property to...
Read more >
What is importing and exporting in React JS? - Educative.io
Importing and exporting in React JS will help us write modular code, i.e., splitting code into multiple files. Importing allows using contents from...
Read more >
Importing Components in React From Other Files - Upmostly
By the end of this article, you'll know how to import class components and functional components in React as well as understand a...
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