摘要: https://github.com/crazycodeboy/react-native-easy-toast 用法: 在render()方法的return()中的最末尾: 在需要吐司的地方: 阅读全文
posted @ 2019-10-11 13:26 liuw_flexi 阅读(895) 评论(0) 推荐(0) 编辑
摘要: https://github.com/crazycodeboy/react-native-event-bus 用法: A页面和B页面中都有相同的列表,点击B页面中的收藏按钮,A页面会跟着更新 阅读全文
posted @ 2019-10-11 13:21 liuw_flexi 阅读(1372) 评论(0) 推荐(0) 编辑
摘要: 使用Context,可以跨越组件进行数据传递 通过静态方法React.createContext()创建一个Context对象,这个Context对象包含两个组件,<Provider />和<Consumer />。 <Provider />的value相当于现在的getChildContext() 阅读全文
posted @ 2019-10-11 10:40 liuw_flexi 阅读(2789) 评论(0) 推荐(0) 编辑