react-slick icon indicating copy to clipboard operation
react-slick copied to clipboard

Invariant Violation: Unable to find node on an unmounted component

Open akbar-pyt opened this issue 8 years ago • 3 comments

Thrown this error when run the test case if i am using component inside react-slick.

import React, { Component } from 'react';
import Slider from 'react-slick';
Class MyComponent extends Component {
    render() {
         return(
                  <Slider> 
                      <div>Test1</div>
                      <div>Test2</div>
                      <div>Test3</div>
                  </Slider>
         )
    }
}

Test Case

 it('Example', () => {
      const renderedValue = renderer
        .create(<MyComponent/>)
        .toJSON();
      expect(renderedValue).toMatchSnapshot();
    });

If i run the test case it shown the following error, Invariant Violation: Unable to find node on an unmounted component.

This issue will happen only when i add the div elements inside the slider alone. Can any one give some suggestion to resolve this?

akbar-pyt avatar Nov 21 '18 15:11 akbar-pyt

I have the same issue

benb1983 avatar Nov 27 '18 14:11 benb1983

Hello community! Have you found a fix for this? I have the same problem as well.

Thank you.

JulioGT avatar Dec 10 '20 16:12 JulioGT

Same problem! Anyone get the solution?

anik avatar Sep 19 '21 09:09 anik