草庐IT

react-router-domV

全部标签

ios - react native : Unable to Resolve Module

我有一个非常简单的ReactNative项目,我正试图开始工作。它是一个iOS项目,只是将RCTRootView添加到UIViewController。当我从网络浏览器中点击url时,我得到:Unabletoresolvemodule`/src/components/HelloReact`from`/Users/myusername/Desktop/DemoReact/index.ios.js`:Directory/src/components/HelloReactdoesn'texist.index.ios.js'usestrict';import{AppRegistry}from'

ios - react-native-navigation 与 react-native-sentry ios

当前正在运行"react-native-navigation":"2.0.0-experimental.304"和"react-native-sentry":"^0.8.1"在react-native-navigation的设置中,它要求用户修改AppDelegate.m使其看起来更像这样example将RCTRootView*rootView=[[RCTRootViewalloc]initWithBundleURL:jsCodeLocation...替换为[[RCCManagersharedInstance]initBridgeWithBundleURL:jsCodeLocation

javascript - React Native 目前是否支持访问用户的地址簿

看起来核心ReactNativeAPI没有为iOS上的地址簿列出任何内容。这似乎是您需要在应用中完成的核心任务。这是只需要构建的东西,还是有特殊原因似乎没有这方面的信息? 最佳答案 一旦获得许可,我已经开始研究支持从用户联系人中读取的native模块。react-native-addressbook-ios 关于javascript-ReactNative目前是否支持访问用户的地址簿,我们在StackOverflow上找到一个类似的问题: https://st

android - 在 React-Native 中同时开发 iOS 和 Android 应用程序

我一直在网上搜索一段时间,试图找到一些在React-Native中同时开发iOS和Android应用程序的最佳实践。我想知道是否有人对此有任何经验。我们应该有两个项目吗?有不同观点的一个项目?对相同的组件共享相同的View?感谢您的宝贵时间! 最佳答案 如何组织组件是个人喜好。但是,您不需要按平台进行组织。只需像这样命名您的组件:MyComponent.android.jsMyComponent.ios.jsReactNative会自动为每个平台选择正确的组件版本。 关于android-

ios - 无法在发布架构中运行 iOS React Native 应用程序

当我将我的iOS项目切换到发布架构时(如https://facebook.github.io/react-native/docs/running-on-device.html所述),我收到此错误:2016-11-2911:49:01.621[fatal][tid:main]NoscriptURLprovided.MakesurethepackagerisrunningoryouhaveembeddedaJSbundleinyourapplicationbundle.unsanitizedScriptURLString:((null))我需要在生产模式下创建静态js包吗?文档建议在早期的

android - 在 react native 应用程序中从 native 基础实现抽屉

我需要使用native基础的抽屉来为androidios和android使用reactnative应用程序。这是本地基础的链接http://nativebase.io/docs/v2.0.0/components#drawer在下面你会找到我的代码:import{Container,Header,Title,Content,Button,Icon,Left,Body,Text}from'native-base';import{Drawer}from'native-base';importSideBarfrom'../components/SideBar';classAppextends

android - 在 native react 中没有从 fbsdk 获取电子邮件 ID

我正在获取登录成功和accessToken。我做的我试过了LoginManager.logInWithReadPermissions(['email','public_profile','user_likes',])然后这个LoginManager.logInWithPublishPermissions(['publish_actions',]).then((result)=>{if(result.isCancelled){console.log('Logincancelled');}else{AccessToken.getCurrentAccessToken().then((data

javascript - 在分页 ScrollView 中 react native 灵活的 View 大小

我正在尝试在ReactNative中使用ScrollView(启用分页)来分页浏览一系列图像。任何人都知道如何使ImageView填充ScrollView的每一页?到目前为止,我只对图像样式的宽度和高度值进行了硬编码。我大致是这样的:render:function(){return(varimages=[{url:'http://url/to/image.jpg'},{url:'http://url/to/another-image.jpg'}];{images.map(image=>{return();})});}显示图像的唯一方法是在样式中硬编码宽度/高度数字。我一直无法让图像只是

ios - React-native 错误需要未知模块 'react'

当我使用Xcode运行我的react-native应用程序时,在应用程序开始加载后,我看到了这个错误:"Requiringunknownmodule"react".Ifyouaresurethemoduleisthere,tryrestartingthepackager."我的package.json内容是:{"name":"the_golf_mentor","version":"0.0.1","private":true,"scripts":{"start":"nodenode_modules/react-native/local-cli/cli.jsstart"},"depende

android - react-native-keyboard-aware-scroll-view 无法正常工作

我正在尝试使用react-native-keyboard-aware-scroll-view,这样键盘就不会覆盖我的输入。出于某种原因,它总是认为有一个键盘处于Activity状态,我猜是因为它总是压缩所有内容。附件是正在发生的事情的图片以及代码。有没有人知道这里发生了什么?我已经玩了一段时间但没有运气。我正在运行react-nativev0.33和react-native-keyboard-aware-scroll-viewv0.2.1。https://www.npmjs.com/package/react-native-keyboard-aware-scroll-viewimpor