【发布时间】:2018-04-27 09:18:00
【问题描述】:
我已经尝试禁用缓存,但它不起作用 我的代码
componentDidMount = () => {
alert("hello")
}
我今天没有收到警报,其他任何内容都没有更新
【问题讨论】:
-
这段代码不足以理解你的问题。
标签: reactjs react-redux
我已经尝试禁用缓存,但它不起作用 我的代码
componentDidMount = () => {
alert("hello")
}
我今天没有收到警报,其他任何内容都没有更新
【问题讨论】:
标签: reactjs react-redux
要在 React Native 中显示警报,您需要使用原生 Alert API,因为不支持浏览器定义的 alert:
import { Alert } from 'react-native';
componentDidMount = () => {
Alert.alert("hello")
}
【讨论】:
我试过了
componentWillMount() {
alert("hello")
}
这成功了
【讨论】: