chenglou / react-motion

A spring that solves your animation problems.
MIT License
21.68k stars 1.15k forks source link

Flow error: Default import from `react` #500

Open rico345100 opened 6 years ago

rico345100 commented 6 years ago

Hi, I just updated my Flow, but after update, it gives me this error from react-motion:

Error: node_modules/react-motion/lib/Types.js.flow:7
  7: import type React from 'react';
                 ^^^^^ Default import from `react`. The default export is a value, but not a type. `import type` only works on type exports like type aliases, interfaces, and classes. If you intended to import the type *of* a value, please use `import typeof` instead.

Using flow@0.57.3 and react-motion@0.4.7

RobinClowers commented 6 years ago

This was fixed in https://github.com/chenglou/react-motion/pull/485, I'm wondering why it was then reverted in https://github.com/chenglou/react-motion/pull/487?

Edit: I guess it wasn't quite right, I'm still seeing errors with that commit.

RobinClowers commented 6 years ago

Looks like it was superseded by https://github.com/chenglou/react-motion/pull/497