Closed ddfridley closed 3 years ago
You might have been looking at an old branch, or time travelling:
https://github.com/joshwcomeau/react-flip-move#usage-with-functional-components https://github.com/joshwcomeau/react-flip-move#gotchas
Thanks. Actually where I was looking was https://www.npmjs.com/package/react-flip-move
If you scroll down to the Gotchas section, it does not mention forwardRef.
Also, on npm is seems to be referencing version 3.0.4 but in the github link you sent it says 3.0.3 is the latest.
What's on npm is working for me but should I switch?
Thanks again for the repo.
@ddfridley Not my repo, I was looking into the same problem with refs and happened to see your issue.
Yeah, I've seen quite a few cases where people publish new versions on npm, but don't push the tags or commits upstream. Probably a mistake here, but similar techniques have been used in the past to conceal malicious code.
NB I switched to use https://github.com/aholachek/react-flip-toolkit which is also worth looking at.
I merged the readme change provided by @JPeer264 back in March -> https://github.com/joshwcomeau/react-flip-move/pull/245
Only josh can update the npm package, but i figured that having an up to date readme at least in the repository is an improvement, even if the readme shipped with the package still lacks that information.
What's on npm is working for me but should I switch?
It seems to work for some people though, which is great. But you won't get me on the record telling you that it will definitely work. I second the suggestion made by @robations to migrate to https://github.com/aholachek/react-flip-toolkit, since react-flip-move
is not maintained anymore.
Please reopen if you have any more questions
The caveat that this doesn't work with functional components should be updated to say that the functional component needs to be wrapped like this:
And I'm so glad it does! Thanks.