Questions tagged [reactjs-native]

React Native is an open source framework created by Facebook to enable the development of apps for iOS and Android with React delivering the same performance as purely native apps do.

React Native is an open source framework created by Facebook to enable the development of apps for iOS and Android with React delivering the same performance as purely native apps do. The idea behind React Native can be best be captured by the slogan "Learn once, write anywhere", enabling developers to use the same development approach for both desktop/browser and mobile apps.

Technically React Native runs the JavaScript code for a React app in a background thread. Updates to the virtual dom are collected, and all changes are sent through an API into the native portion of the app. By doing this, React Native avoids slowing down the FPS rate of the app by making the app wait for unfinished JavaScript operation.

React Native was announced at React.js Conf 2015, the source code will be made available shortly after the conference. The presentation with the announcement of React Native is available on Youtube.

53 questions
147
votes
12 answers

How to make a rest post call from ReactJS code?

I am new to ReactJS and UI and I wanted to know how to make a simple REST based POST call from ReactJS code. If there is any example present it would be really helpful.
Divya
  • 1,577
  • 3
  • 12
  • 8
61
votes
3 answers

Can I disable a View component in react native?

My app screen has a View component with few Text Inputs. I cannot disable text inputs. Is there a way that I can disable complete View? P.S.: By Disabling a View component I mean that the component renders but becomes unresponsive of any action.
user3300203
  • 985
  • 2
  • 8
  • 7
24
votes
2 answers

Building hybrid React apps for iOS and Android with native performance

Is it possible to build apps for iOS and Android with Facebook's React JavaScript framework, delivering nearly the same performance as native apps?
raju-bitter
  • 8,906
  • 4
  • 42
  • 53
22
votes
12 answers

React Native - Port 8081 already in use, packager is either not running or not running correctly Command /bin/sh failed with exit code 2

I'm trying to get up and running with React Native and I am seeing the message below in Xcode: Port 8081 already in use, packager is either not running or not running correctly Command /bin/sh failed with exit code 2 I went to the React Native…
user1454373
  • 370
  • 1
  • 3
  • 9
17
votes
3 answers

ReactJS toLowerCase is not a function

I am doing a comparison by converting my text to lowercase and comparing its index to -1, in order to have some value to the particular field in ReactJS, but I am getting this error in JavaScript console: Uncaught TypeError:…
MaxWorld
  • 727
  • 2
  • 8
  • 11
17
votes
2 answers

How to setup react native to use flow?

I was wondering how I have to setup .flowConfig in order to use flow on a React- Native project. I created an empty .flowConfig file but as soon as I include the react-native module in a JS source file and check this file with flow, flow displays a…
rogergl
  • 3,501
  • 2
  • 30
  • 49
7
votes
1 answer

(node:53177) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): TypeError: Cannot read property 'message' of undefined

Not sure what has caused this issue.. It worked fine yesterday. Today when I tried to run react-native run-android. I get this error. any ideas? Starting JS server... Running adb -s 3f71ece6 reverse tcp:8081 tcp:8081 Building and installing the app…
7
votes
2 answers

Child parent component communication in ReactJS

I like to send the attribute properties/props/state values from child component to parent component on an event fire onDrag. I could not find proper documentation on this. Here is my code: /*** @jsx React.DOM */ var APP=React.createClass({ …
Nithish Reddy J
  • 155
  • 3
  • 16
6
votes
5 answers

react-native component lifecycle methods not firing on navigation

I am having an issue where I setState in multiple components based on the same key in AsyncStorage. Since the state is set in componentDidMount, and these components don't necessarily unmount and mount on navigation, the state value and the…
Clayton
  • 141
  • 1
  • 2
  • 7
5
votes
0 answers

Error after npm run eject

I am learning how to make a mobile app using react native but every time I run in the terminal npm run eject it gives me this error at the end I tried several npm versions but I keep always getting this error Ejected successfully! Please consider…
Karim Sawma
  • 83
  • 1
  • 1
  • 10
3
votes
2 answers

Using ReactJS with npm and its giving following error(Unexpected token)

Any information would be really helpful ,Initially i ran the npm install babel-loader command as well. I have ERROR in ./app-client.js Module build failed: SyntaxError: /Users/dawatramani/ReactNodejs/app-client.js: Unexpected token (4:13) 2 |…
Divya
  • 1,577
  • 3
  • 12
  • 8
3
votes
0 answers

using React.DOM in react-native code

I'm just getting started with react-native Android app. I want to use React.DOM instead of using .jsx code. For example instead of below .jsx syntax, I wanted to use React.DOM wrapper. render: function() { return (
Sahas
  • 3,046
  • 6
  • 32
  • 53
3
votes
1 answer

What is "Hello, world!" for ReactJS Native Apple Watch WatchKit apps and Glances?

As best I can tell for now, React Native for iOS offers tooling to talk to an iPhone or iPad, but I've looked and failed to find documentation for how to talk to an Apple Watch, via WatchKit or glances. Is there a "Hello, world?" available…
Christos Hayward
  • 5,777
  • 17
  • 58
  • 113
3
votes
1 answer

Using FB JS sdk for user authentication in react-native

I am aware of native ios solution. I am wondering if it is possible to use FB JS sdk in react-native to login the users. A sample code to load FB SDK below - it will throw error in react-native because document doesn't seem to be a valid object in…
Sal
  • 4,312
  • 1
  • 17
  • 26
2
votes
3 answers

react Native onChange event has name type value undefined

I am using NativeBase for react native app . I am trying to trigger event when text changes on my input fields
Muhammad Ali
  • 418
  • 6
  • 20
1
2 3 4