Android iOS通用的;一个可用于做loading动画的组件:https://github.com/mohebifar/react-native-loader
感觉动画效果还可以,就拿来用了。
但是在新版RN上有些问题,需要修改。
在此记录下
基于RN-0.62.2 React-16.11.0,存在以下问题
查看https://github.com/react-native-community/art下的说明:
Migrating from the core react-native module
To migrate to this module you need to follow all the installation instructions above and change your imports from:
import {ART} from 'react-native';
const {Surface, Shape} = ART;
to:
import {Surface, Shape} from '@react-native-community/art';
因此需要安装@react-native-community/art,并修改ART模块下的数据导入方式
npm install @react-native-community/art --save