const LoginScreen = ({navigation}) => {
const [profile, setProfile] = useState(null)
const imagePick = () => {
if(openPicker===null)
console.log("Null Object")
else
ImagePicker.openPicker?({
width: 400,
height: 400,
cropping: true,
}).then(image => {
console.log(image);
setProfile(image.path)
});
};
return ()
};
export default LoginScreen;
这是我的代码——我不明白我的语法错误在哪里。
这就是我得到的:
错误:SyntaxError: C:\Users\lenovo\IdeaProjects armers-guild-frontend\src\screens\Login.js: 意外令牌,预期为“:” (26:10)
24 |控制台日志(图像);
25 |设置配置文件(图像。路径)
26 | });
| ^
27 | };
如果有人理解请帮我找到错误并告诉我如何解决它。我试了几个小时但仍然找不到任何东西。
我还在 stackoverflow 上的一些帖子上看到有人谈到更新版本是真的吗?
我正在使用 IntellJ 和 React Native