用于中继和 react-native-drawer 的 Babel
Posted
技术标签:
【中文标题】用于中继和 react-native-drawer 的 Babel【英文标题】:Babel for relay and react-native-drawer 【发布时间】:2017-01-01 05:03:37 【问题描述】:我正在尝试将relay
与react-native-drawer
一起使用,但它给我的_this.state.viewport
是未定义的。我已将问题缩小到 babel,但现在不确定是否继续。 (已编辑)
读完这个问题https://github.com/root-two/react-native-drawer/issues/140(已编辑)
relay
使用
"passPerPreset": true,
"presets": [
"plugins": ["./plugins/babelRelayPlugin"],
"react-native"
]
我认为这就是问题所在(已编辑)
我尝试使用babel-plugin-transform-class-properties
,但似乎没有帮助
【问题讨论】:
+1 有同样的问题,我也有 Relay。当抽屉工作并添加中继时,我遇到了 babel-relay-plugin 的问题。 【参考方案1】:我找到了解决方案并创建了一个模板。总结是使用 react-native-router-flux 和 babel-relay-plugin-loader
https://github.com/hiaw/rn-relay-drawer-template
【讨论】:
以上是关于用于中继和 react-native-drawer 的 Babel的主要内容,如果未能解决你的问题,请参考以下文章
jQuery 用于根据下拉列表的更改值在 asp 中继器中设置背景颜色