compatible for recent react version
I have been using this package for a while now. It is small, simple and easy to use and exactly what I wanted.
I would love to use it with latest reactjs (v17.0.2) which it has been months from its release. If anyone available for the upgrade of this package, please feel free to make pull requests. I would have done it myself but I do not know how its done. I need someone who can guide in this case. If anyone already working in it, I would be glad to hear it.
I have been using this package for a while now. It is small, simple and easy to use and exactly what I wanted.
I would love to use it with latest reactjs (v17.0.2) which it has been months from its release. If anyone available for the upgrade of this package, please feel free to make pull requests. I would have done it myself but I do not know how its done. I need someone who can guide in this case. If anyone already working in it, I would be glad to hear it.
If you really need this package for latest react., download the git repo and copy the lib folder in to your project/src/lib
I have used like this only
A prerelease that is compatible with React v18 is available for testing on npm: 3.0.0-0
Thanks for the version, now I try to use this version 3.0.0-0 with react 18.2.0 and typescript. But it doesn't work, it shows these errors in the console.
Warning: React.jsx: Invalid type: Expected a string (for built-in components) or a class/function (for composite components) but got: object.
I make several attempts but I get the same error. Does anyone know how to fix it?
Yeah, i have the same problem. Console shows me: Expected a string (for built-in components) or a class/function (for composite components) but got: object.
Maybe some help?
It isn't being exported correctly. Here is a workaround
import BackgroundSlider from 'react-background-slider';
// @ts-ignore Workaround for bug on react-background-slider
const Slider = BackgroundSlider['react-background-slider'].default;
// Use as normal
const MyComponent = () => <Slider images={images} duration={5} transition={0.5} />
@drewjenkins Thank you so much, that worked for me in electronjs.
Hi @drewjenkins, thanks your comment. Do you have an idea what needs to be changed inside the package to export it correctly?
Nevermind, sorry for the delay. There is now a new pre-version on npm with updated versions and hopefully the export issue is also solved. Update using:
npm i [email protected]
Please update to the latest version and reopen a new issue if you experience troubles with the latest react version.
npm i [email protected]
Thanks for your participation and support.