react-native 相关的命令

原创文章
声明:作者声明此文章为原创,未经作者同意,请勿转载,若转载,务必注明本站出处,本平台保留追究侵权法律责任的权利。
全栈老韩
全栈工程师,擅长iOS App开发、前端(vue、react、nuxt、小程序&Taro)开发、Flutter、React Native、后端(midwayjs、golang、express、koa)开发、docker容器、seo优化等。
  1. React Native Clear Cache: https://gist.github.com/jmoses89/c2e4786fd342b3444f3bc6beff32098d#file-react-native-clear-cache
复制代码
watchman watch-del-all 
rm -rf node_modules
npm cache clean 
npm install
npm start --reset-cache
  1. 在0.42的react native中加入0.43的新list
    参考:https://hackernoon.com/react-native-new-flatlist-component-30db558c7a5b

The only caveat here is that you need to actually get the source code for the new React Native components in order to use them. They currently exist only on master, so here’s a quick script that will download them straight into your project (assuming you’ve already installed react-native using npm or Yarn). Copy this whole command into your terminal:

复制代码
mkdir -p node_modules/react-native/Libraries/Lists/ && \ for file in 'FlatList' 'MetroListView' 'SectionList' 'VirtualizedList' 'VirtualizedSectionList' 'ViewabilityHelper' 'VirtualizeUtils'; \ do curl https://raw.githubusercontent.com/facebook/react-native/master/Libraries/Lists/${file}.js > node_modules/react-native/Libraries/Lists/${file}.js; \ done

暂无评论,快来发表第一条评论吧