【发布时间】:2021-08-27 12:06:15
【问题描述】:
如何在 React-Native 中使用 lottie Jason 文件和箭头函数
这段代码正常工作
import React from 'react';
import LottieView from 'lottie-react-native';
export default class BasicExample extends React.Component {
render() {
return (
<LottieView source={require('./lotties/rocket.json')} autoPlay loop />
)
}
}
但是这段代码不工作它给出了错误。如何使用带箭头功能的 LottieView
import React from 'react';
import LottieView from 'lottie-react-native';
const App = () => {
render(); {
return(
<LottieView source={require('./lotties/rocket.json')} autoPlay loop />
);
}
}
export default App;
【问题讨论】:
标签: android react-native lottie