.flowconfig
@H_404_20@
这是一个快速的解决方案,可以让我忽略react-native的与流相关的错误
... [libs] node_modules/react-native/Libraries/react-native/react-native-interface.js node_modules/react-native/flow flow/ ...
index.js
import { View } from 'react-native'; ---> produce: react-native. required module not found. ...
也许我的flowconfig的libs设置坏了?
- react-native 0.42.3
- flow-bin 0.45.0
>转到项目目录
cd my-awesome-project
>如果项目中不存在,则在项目中创建一个名为flow-typed的目录
mkdir flow-typed
>添加文件react-native.js
touch react-native.js
>将以下内容添加到react-native.js并使用您喜欢的编辑器点击保存
声明模块’react-native'{declare module.exports:any;}