backgroundVideo
backgroundVideo copied to clipboard
How do you import this in React?
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?
Anyone ever figure this out?
Did you try import BackgroundVideo from "background-video"; ?
Yes, I get the same error as above.
Did you try
import BackgroundVideo from "background-video";?
Of course. To be he honest I need to spend a bit of time re-factoring this as it's very old and unmaintained currently.
For now I'd recommend importing the dist (import my/path/to/backgroundVideo/dist/backgroundVideo.js). I've never tested it with React as this was a pure JS solution when I made it.
I'll try and find some time if someone wants to make a PR I'd be happy to review.
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!
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 <[email protected] 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 .
Same in VueJS