.Warning: setState(…): Cannot update during an existing state transition (such as within render
or another component’s constructor). Render methods should be a pure function of props and state; constructor side-effects are an anti-pattern, but can be moved to componentWillMount
。当报这类错误时,说明你的props和states在渲染的时候更改了。 read more
如何用setState更新数组中的某个元素
如何用setState更新数组中的某个元素,下面思路搞定: read more
如何实时更新flatlist数据
很简单,让你的FlatList 使用extraData
属性
通过配置extraData={this.state},FlatList就会当this.state数据发生改变时,更新数据。
react-native-button 使用详解
很不错的button组件 read more
介绍一个很不错的弹层插件react-native-modalbox
今天介绍一个很不错的弹出层插件,他可以完成底部弹出并悬浮底部,顶部弹出并悬浮顶部,悬浮中部等位置,而且里面的内容我们可以定制,非常的好。 read more
微信小程序:返回更新数据
开发中你会遇到需要返回页面,并更新,比如你从A跳转B,B更改了信息,点击左上角返回时,你希望A页面也随之更改,虽然微信有wx.navigateBack()但无法传参。 read more
react-native固定吸顶navBar和底部tabBar
你会发现react-native没有fixed,那么怎么才能将元素,固定吸顶和底部呢? read more
react native 7 flatlist
今天我们要获取全部产品,并用flatlist展示他们。
read more
react native 7 从网络获取标签
这回我们使用远程数据,使用真正的数据结构,来实战一下。 read more
react native 6 用ScrollView制作滚动的分类标签
这里构建一个可以滚动的分类选项卡,主要使用ScrollView组件。 read more