Skip to content

findDOMNode is deprecated in StrictMode #727

@pmoieni

Description

@pmoieni

I'm getting this error:

findDOMNode is deprecated in StrictMode

animation is working well. here is my code:

<CSSTransition in={ showDeleteModal } classNames="delete-modal" timeout={ 300 } unmountOnExit>
<DeleteModal product={ deleteProduct } deleteFunc={ removeProduct } closeFunc={ closeDeleteModal }/>

I also tried this solution mentioned on #668 suggested by @pixel-fixer

<CSSTransition nodeRef={nodeRef} in={ showDeleteModal } classNames="delete-modal" timeout={ 300 } unmountOnExit>
    <div ref={nodeRef}>
        <DeleteModal product={ deleteProduct } deleteFunc={ removeProduct } closeFunc={ closeDeleteModal } />
    </div>
</CSSTransition>

It removes the error but also disables animation.

Is there any solution available?
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions