react-parallax-component
react-parallax-component copied to clipboard
Refs Must Have Owner Warning
Cannot run project because of this warning.
Use code from the example
` import React, { Component } from 'react'; import ParallaxComponent from 'react-parallax-component';
const WORD = 'AWESOME REACT'; const random = (min, max) => Math.random() * (max - min) + min;
export default class Test extends Component { render() { const wrap = { height: window.innerHeight * 10, };
return (
<div style={wrap} >
{
WORD.split('').map((letter, index) =>
<ParallaxComponent
speed={random(0, 0.1) * ((random(0, 2) > 1) ? 1 : -1)}
top="40%"
left={(index + 1) * 80}
key={index}
>
<span className="letter">
{letter}
</span>
</ParallaxComponent>
)
}
</div>
);
} } ` So, how to resolve this? Thanks!
It's certainly depressing when you install a package, copy paste the example docs.. and it doesn't work : )
This package works with React 14, and if you are using 15-16, it installs react 14 in your node_modules.. Better find another, as this is not maintained.