Fix componentWillReceiveProps warning on tests #91
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What this PR does?
Use @korbav/react-motion instead of react-motion
Why?
The react-motion library seems to not have support anymore, this causes a warning described in this issue #79
This warning shows when you use the React.StrictMode
In order to test if the warning was solved, I created a test with testing library using the AutoPlay component
The code is in the end of this PR
How?
Following this issue chenglou/react-motion#604, @serprex cited how to fix the warning with a react-17 compatible version of the motion library created by @korbav
This PR replace the react-motion with the fix that korbav made!
How I tested if the warning was gone
src/ItemsCarousel/ItemsCarouselBase.js
line 187babel.config.js