Closed nitesh585 closed 3 years ago
It will not work in useEffect. Use it in componentDidMount
componentDidMount () { loadCaptchaEnginge((5, "blue"); };
@masroorejaz I have already mentioned that I am creating a function-based component, not a class-based. And, In the docs of react it is clearly mentioned that: If you’re familiar with React class lifecycle methods, you can think of useEffect Hook as componentDidMount, componentDidUpdate, and componentWillUnmount combined.
Then, It should work with useEffect too.
I haven't tested it or work a lot with useEffect.
So really sorry can't help you there.
I am creating a function-based react component and loading Enginge inside useEffect method.
But, when I tried to change the background color of the captcha it didn't work.