解决启动白屏react-native-splash-screen使用记录
首先下载插件 npm install react-native-splash-screen --save
然后自动安装插件 react-native link react-native-splash-screen
在安装过程如果报错的话
报错:Error: Cannot find module 'asap/raw'
原因找不到模块缺少Module
重新 npm i 然后在执行命令
https://www.jianshu.com/p/4540ac17dfd4
https://blog.csdn.net/v619498372/article/details/79984452
import SplashScreen from 'react-native-splash-screen'
export default class WelcomePage extends Component {
componentDidMount() {
SplashScreen.hide();
}
}
网友评论