当我试图在ios模拟器上构建我的应用程序时,它说:
绑定失败:语法错误:/Users/MyName/MyApp/node_modules/react native/node_modules/react native/Libraries/Components/Switch/Switch.js:目前尚未启用对实验语法nullishCoalescingOperator
的支持(167:52):
165 | {...props}
166 | {...platformProps}
> 167 | accessibilityRole={props.accessibilityRole ?? 'button'}
| ^
168 | onChange={this._handleChange}
169 | onResponderTerminationRequest={returnsFalse}
170 | onStartShouldSetResponder={returnsTrue}
Add @babel/plugin-proposal-nullish-coalescing-operator (https://git.io/vb4Se) to the 'plugins' section of your Babel config to enable transformation.
我照上面说的做了,但没用...