question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Flow type complains about several issues with react-flip-move

See original GitHub issue

Like this one

node_modules/react-flip-move/src/enter-leave-presets.js:61
 61: // $FlowFixMe
     ^^^^^^^^^^^^^ Error suppressing comment. Unused suppression

I’m pretty sure you should be able to remove that. Actually, there are quite a few flow-related issues. I think it may be best to remove src from the package.json. But I could be wrong. I’ve not done much with flow in OSS yet…

Here are all the errors I get:

all of the errors
node_modules/react-flip-move/lib/FlipMove.js.flow:57
 57:   state = {
       ^ Experimental class instance field usage. Class instance fields are an active early stage feature proposal that may change. You may opt-in to using them anyway in Flow by putting `esproposal.class_instance_fields=enable` into the [options] section of your .flowconfig.

node_modules/react-flip-move/lib/FlipMove.js.flow:69
 69:   childrenData: {
       ^ Experimental class instance field usage. Class instance fields are an active early stage feature proposal that may change. You may opt-in to using them anyway in Flow by putting `esproposal.class_instance_fields=enable` into the [options] section of your .flowconfig.

node_modules/react-flip-move/lib/FlipMove.js.flow:82
 82:   parentData: NodeData = {
       ^ Experimental class instance field usage. Class instance fields are an active early stage feature proposal that may change. You may opt-in to using them anyway in Flow by putting `esproposal.class_instance_fields=enable` into the [options] section of your .flowconfig.

node_modules/react-flip-move/lib/FlipMove.js.flow:91
 91:   heightPlaceholderData: NodeData = {
       ^ Experimental class instance field usage. Class instance fields are an active early stage feature proposal that may change. You may opt-in to using them anyway in Flow by putting `esproposal.class_instance_fields=enable` into the [options] section of your .flowconfig.

node_modules/react-flip-move/lib/FlipMove.js.flow:101
101:   remainingAnimations = 0;
       ^^^^^^^^^^^^^^^^^^^^^^^^ Experimental class instance field usage. Class instance fields are an active early stage feature proposal that may change. You may opt-in to using them anyway in Flow by putting `esproposal.class_instance_fields=enable` into the [options] section of your .flowconfig.

node_modules/react-flip-move/lib/FlipMove.js.flow:102
102:   childrenToAnimate: Array<string> = [];
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Experimental class instance field usage. Class instance fields are an active early stage feature proposal that may change. You may opt-in to using them anyway in Flow by putting `esproposal.class_instance_fields=enable` into the [options] section of your .flowconfig.

node_modules/react-flip-move/lib/FlipMove.js.flow:164
164:   runAnimation = () => {
       ^ Experimental class instance field usage. Class instance fields are an active early stage feature proposal that may change. You may opt-in to using them anyway in Flow by putting `esproposal.class_instance_fields=enable` into the [options] section of your .flowconfig.

node_modules/react-flip-move/lib/FlipMove.js.flow:180
180:   doesChildNeedToBeAnimated = (child: ChildData) => {
       ^ Experimental class instance field usage. Class instance fields are an active early stage feature proposal that may change. You may opt-in to using them anyway in Flow by putting `esproposal.class_instance_fields=enable` into the [options] section of your .flowconfig.

node_modules/react-flip-move/lib/FlipMove.js.flow:357
357:     requestAnimationFrame(() => {
         ^^^^^^^^^^^^^^^^^^^^^ identifier `requestAnimationFrame`. Could not resolve name

node_modules/react-flip-move/lib/dom-manipulation.js.flow:152
152:     [string]: number,
                ^ Unexpected token ]

node_modules/react-flip-move/lib/enter-leave-presets.js.flow:59
 59: // $FlowFixMe
     ^^^^^^^^^^^^^ Error suppressing comment. Unused suppression

node_modules/react-flip-move/lib/enter-leave-presets.js.flow:61
 61: // $FlowFixMe
     ^^^^^^^^^^^^^ Error suppressing comment. Unused suppression

node_modules/react-flip-move/lib/enter-leave-presets.js.flow:63
 63: // $FlowFixMe
     ^^^^^^^^^^^^^ Error suppressing comment. Unused suppression

node_modules/react-flip-move/lib/enter-leave-presets.js.flow:65
 65: // $FlowFixMe
     ^^^^^^^^^^^^^ Error suppressing comment. Unused suppression

node_modules/react-flip-move/lib/helpers.js.flow:40
 40: function memoizeString<T>(fn: (string) => T): (string) => T {
                                            ^^ Unexpected token =>

node_modules/react-flip-move/lib/prop-converter.js.flow:63
 63:     static defaultProps = {
         ^ Experimental class static field usage. Class static fields are an active early stage feature proposal that may change. You may opt-in to using them anyway in Flow by putting `esproposal.class_static_fields=enable` into the [options] section of your .flowconfig.

node_modules/react-flip-move/lib/typings.js.flow:5
  5:   [string]: string,
              ^ Unexpected token ]

node_modules/react-flip-move/src/FlipMove.js:57
 57:   state = {
       ^ Experimental class instance field usage. Class instance fields are an active early stage feature proposal that may change. You may opt-in to using them anyway in Flow by putting `esproposal.class_instance_fields=enable` into the [options] section of your .flowconfig.

node_modules/react-flip-move/src/FlipMove.js:69
 69:   childrenData: {
       ^ Experimental class instance field usage. Class instance fields are an active early stage feature proposal that may change. You may opt-in to using them anyway in Flow by putting `esproposal.class_instance_fields=enable` into the [options] section of your .flowconfig.

node_modules/react-flip-move/src/FlipMove.js:82
 82:   parentData: NodeData = {
       ^ Experimental class instance field usage. Class instance fields are an active early stage feature proposal that may change. You may opt-in to using them anyway in Flow by putting `esproposal.class_instance_fields=enable` into the [options] section of your .flowconfig.

node_modules/react-flip-move/src/FlipMove.js:91
 91:   heightPlaceholderData: NodeData = {
       ^ Experimental class instance field usage. Class instance fields are an active early stage feature proposal that may change. You may opt-in to using them anyway in Flow by putting `esproposal.class_instance_fields=enable` into the [options] section of your .flowconfig.

node_modules/react-flip-move/src/FlipMove.js:101
101:   remainingAnimations = 0;
       ^^^^^^^^^^^^^^^^^^^^^^^^ Experimental class instance field usage. Class instance fields are an active early stage feature proposal that may change. You may opt-in to using them anyway in Flow by putting `esproposal.class_instance_fields=enable` into the [options] section of your .flowconfig.

node_modules/react-flip-move/src/FlipMove.js:102
102:   childrenToAnimate: Array<string> = [];
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Experimental class instance field usage. Class instance fields are an active early stage feature proposal that may change. You may opt-in to using them anyway in Flow by putting `esproposal.class_instance_fields=enable` into the [options] section of your .flowconfig.

node_modules/react-flip-move/src/FlipMove.js:164
164:   runAnimation = () => {
       ^ Experimental class instance field usage. Class instance fields are an active early stage feature proposal that may change. You may opt-in to using them anyway in Flow by putting `esproposal.class_instance_fields=enable` into the [options] section of your .flowconfig.

node_modules/react-flip-move/src/FlipMove.js:180
180:   doesChildNeedToBeAnimated = (child: ChildData) => {
       ^ Experimental class instance field usage. Class instance fields are an active early stage feature proposal that may change. You may opt-in to using them anyway in Flow by putting `esproposal.class_instance_fields=enable` into the [options] section of your .flowconfig.

node_modules/react-flip-move/src/FlipMove.js:357
357:     requestAnimationFrame(() => {
         ^^^^^^^^^^^^^^^^^^^^^ identifier `requestAnimationFrame`. Could not resolve name

node_modules/react-flip-move/src/dom-manipulation.js:152
152:     [string]: number,
                ^ Unexpected token ]

node_modules/react-flip-move/src/enter-leave-presets.js:59
 59: // $FlowFixMe
     ^^^^^^^^^^^^^ Error suppressing comment. Unused suppression

node_modules/react-flip-move/src/enter-leave-presets.js:61
 61: // $FlowFixMe
     ^^^^^^^^^^^^^ Error suppressing comment. Unused suppression

node_modules/react-flip-move/src/enter-leave-presets.js:63
 63: // $FlowFixMe
     ^^^^^^^^^^^^^ Error suppressing comment. Unused suppression

node_modules/react-flip-move/src/enter-leave-presets.js:65
 65: // $FlowFixMe
     ^^^^^^^^^^^^^ Error suppressing comment. Unused suppression

node_modules/react-flip-move/src/helpers.js:40
 40: function memoizeString<T>(fn: (string) => T): (string) => T {
                                            ^^ Unexpected token =>

node_modules/react-flip-move/src/prop-converter.js:63
 63:     static defaultProps = {
         ^ Experimental class static field usage. Class static fields are an active early stage feature proposal that may change. You may opt-in to using them anyway in Flow by putting `esproposal.class_static_fields=enable` into the [options] section of your .flowconfig.

node_modules/react-flip-move/src/typings.js:5
  5:   [string]: string,
              ^ Unexpected token ]


Found 34 errors

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:13 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
joshwcomeaucommented, May 15, 2017

Hi @kentcdodds,

Thanks for pointing this out. We only recently type-annotated our source, and it hadn’t occurred to me that Flow would run within node_modules in others’ projects.

But you’re right, it probably makes sense to drop /src from the distributed NPM package. I can’t imagine this being problematic, but I’ll still start with a beta release and try it on a side project myself, to be sure.

(BTW - I really enjoyed Javascript Air 😃 was sad to see it go, but totally understand the desire to free up time for your projects)

1reaction
Hypnosphicommented, May 15, 2017

Is that recommendation documented anywhere?

Unfortunately, not really

Read more comments on GitHub >

github_iconTop Results From Across the Web

Issues · joshwcomeau/react-flip-move - GitHub
Effortless animation between DOM changes (eg. list reordering) using the FLIP technique. - Issues · joshwcomeau/react-flip-move.
Read more >
Troubleshooting Guide - React Flow
This guide contains warnings and errors that can occur when using React Flow. We are also adding common questions and pitfalls that we...
Read more >
Issue with leave animation using React-Flip-Move
The enter animation works perfectly, fine, but unforunately, when I click 'x' on one of the channels, the element (in my case a...
Read more >
react-flip-move examples - CodeSandbox
React Flip Move Examples. Learn how to use react-flip-move by viewing and forking example apps that make use of react-flip-move on CodeSandbox.
Read more >
FINANCIAL CRISIS - GovInfo
case study investigations of specific financial firms—and in many cases specific ... cies and capital flows during the years leading up to the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found