反应原生的更改日志提及 https://facebook.github.io/react/blog/2015/04/17/react-native-v0.4.html
NPM模块兼容性:NPM上有很多库不依赖于在React Native中真正有用的节点/浏览器内部,例如superagent,underscore,...
但它对我不起作用.这是我通过package.json安装的方式
# package.json
"dependencies": {
"react-native": "*",
"underscore": "^1.8.3"
...
Run Code Online (Sandbox Code Playgroud)
我确实在npm dependecy中看到了它
# npm ls
??? react-native@0.8.0
| ...
??? react-native-navbar@0.7.3
??? underscore@1.8.3
Run Code Online (Sandbox Code Playgroud)
它确实适用于其他一些反应组件
这就是我的要求
var _ = require('underscore');
Run Code Online (Sandbox Code Playgroud)
但它不起作用,_是不确定的
谢谢你的建议.
示例 https://github.com/facebook/react-native/blob/master/Examples/UIExplorer/PanResponderExample.js#L41
var PanResponderExample = React.createClass({
...
circle: (null : ?{ setNativeProps(props: Object): void })
...
Run Code Online (Sandbox Code Playgroud)
我不知道这是什么意思 circle: (null : ?{ setNativeProps(props: Object): void })
谢谢你的建议.