Questions tagged [react-native]

React Native is a JavaScript library used to build native mobile apps using React. The focus of React Native is on developer efficiency across all the platforms you care about - learn once, write anywhere.

Filter by
Sorted by
Tagged with
928votes
46answers
337kviews

What is the difference between React Native and React?

I have started to learn React out of curiosity and wanted to know the difference between React and React Native - though could not find a satisfactory answer using Google. React and React Native seems ...
user avatar
685votes
10answers
226kviews

What is the difference between using constructor vs getInitialState in React / React Native?

I've seen both used interchangeably. What are the main use cases for both? Are there advantages / disadvantages? Is one a better practice?
user avatar
  • 49.8k
601votes
33answers
312kviews

Hide keyboard in react-native

If I tap onto a textinput, I want to be able to tap somewhere else in order to dismiss the keyboard again (not the return key though). I haven't found the slightest piece of information concerning ...
user avatar
  • 6,899
545votes
31answers
431kviews

React Native android build failed. SDK location not found

I have error when i start running android What went wrong: A problem occurred evaluating project ':app'. > SDK location not found. Define location with sdk.dir in the local.properties file or ...
user avatar
525votes
35answers
669kviews

How can I insert a line break into a <Text> component in React Native?

I want to insert a new line (like \r\n, <br />) in a Text component in React Native. If I have: <text> <br /> Hi~<br /> this is a test message.<br /> </text> Then ...
user avatar
  • 5,262
448votes
14answers
123kviews

Error Running React Native App From Terminal (iOS)

I am following the tutorial on the official React Native website. Using the following to build my project: react-native run-ios I get the error: Found Xcode project TestProject.xcodeproj xcrun: ...
user avatar
  • 5,121
443votes
37answers
390kviews

How to do logging in React Native

How can I log a variable in React Native, like using console.log when developing for web?
user avatar
  • 15.2k
397votes
50answers
373kviews

Unable to load script from assets index.android.bundle on windows

I'm trying to run my first React Native project for first time on my device (Android 4.2.2). And I get: unable to load script from assets index.android.bundle Commands that I used: cd (project ...
user avatar
  • 4,115
389votes
25answers
303kviews

React Native Error: ENOSPC: System limit for number of file watchers reached

I have setup a new blank react native app. After installing few node modules I got this error. Running application on PGN518. internal/fs/watchers.js:173 throw error; ^ Error: ENOSPC: System ...
user avatar
375votes
8answers
86kviews

What is the difference between Hot Reloading and Live Reloading in React Native?

I'm a bit confused here. When I'm debugging a React Native Application, I usually enable both Hot Reloading and Live Reloading. I want to know what is the difference between them?
user avatar
331votes
14answers
188kviews

How to add icons to React Native app

I am making a React Native app. I would like to customize the app icon (meaning the icon that you click on to start the app). I have Googled this, but I keep finding different types of icons that ...
user avatar
  • 6,429
322votes
6answers
143kviews

What are my options for storing data when using React Native? (iOS and Android) [closed]

I am still new in the React Native world, and generally in the mobile/native world as well, and I am finding the documentation a bit lacking when it comes to data persistence. What are my options for ...
user avatar
  • 7,976
320votes
48answers
266kviews

How do you debug React Native?

How does one debug their React code with React Native while the app is running in app simulator?
user avatar
  • 4,679
301votes
18answers
380kviews

ReactNative: how to center text?

How to center Text in ReactNative both in horizontal and vertical? I have an example application in rnplay.org where justifyContent="center" and alignItems="center" is not working: https://rnplay....
user avatar
  • 10.3k

15 30 50 per page
1
2 3 4 5
8311