我正在使用react-native 0.52.0和react- 16.2.0。我的本机应用程序运行缓慢。我想优化其性能。谁能告诉我如何使本机应用程序更快地做出反应以及如何衡量其性能和内存使用情况?是否有任何工具可以衡量其总体绩效
加载图像时出现以下错误:
Module build failed: Error: dyld: Library not loaded: /usr/local/opt/libpng/lib/libpng16.16.dylib
Run Code Online (Sandbox Code Playgroud)
var ImagePicker = require('react-native-image-picker');
call() {
var options = {
title: 'Select Avatar',
customButtons: [
{name: 'fb', title: 'Choose Photo from Facebook'},
],
storageOptions: {
skipBackup: true,
path: 'images'
}
};
ImagePicker.showImagePicker(options, (response) => {
console.log('Response = ', response);
if (response.didCancel) {
console.log('User cancelled image picker');
}
else if (response.error) {
console.log('ImagePicker Error: ', response.error);
}
else if (response.customButton) {
console.log('User tapped custom button: ', response.customButton);
}
else {
let source = { uri: response.uri };
// You can also …Run Code Online (Sandbox Code Playgroud)