0

我对 react-native 很陌生。我在用于混合应用程序开发的 Cordova/ionic 框架方面有很好的经验。我只是在探索 react/react-native。我喜欢的一个概念是“virtualDOM” 这里有几个问题。(有些可能是外行问题。但是,只是想弄清楚我的想法。)

  1. 因为VirtualDOM,你认为内存占用会增加吗?
  2. 我正在尝试开发一个播放/暂停/停止视频的小应用程序。并开始/停止视频的录制。您是否有任何可用于访问媒体设备的插件?
  3. react-native 是否支持所有设备原生功能?(如地址簿、文件系统、地理位置、振动、电池状态、设备原生日历、捕获、联系人、设备、设备运动、短信)。如果是这样,您能否指出我可以访问设备特定功能的一些链接?
4

1 回答 1

1
  1. Of course a React Native app is slower and uses more memory than a full native app. However, React Native still seems to be pretty performant in many ways.

  2. There is a library called react-native-video which supports all you're asking for. There might however be some issues on older versions of android. https://www.npmjs.com/package/react-native-video

  3. A lot of these features are supported by React Native: https://facebook.github.io/react-native/docs/actionsheetios.html#content (Check APIs in the sidebar). If something is not implemented by React Native itself, probably somebody else already did and there is a npm package you can install (and link with rnpm for linking android/ios code). If you want something custom, you can still build your own Java/Swift/objectiveC component and wrap it to a React Native component. (https://facebook.github.io/react-native/docs/native-components-android.html and https://facebook.github.io/react-native/docs/native-components-ios.html)

于 2016-05-21T21:12:01.267 回答