How to add icons to React Native app

iOS Icons Set AppIcon in Images.xcassets. Add 9 different size icons: 29pt 29pt*2 29pt*3 40pt*2 40pt*3 57pt 57pt*2 60pt*2 60pt*3. Images.xcassets will look like this: Android Icons Put ic_launcher.png in folders [ProjectDirectory]/android/app/src/main/res/mipmap-*/. 72*72 ic_launcher.png in mipmap-hdpi. 48*48 ic_launcher.png in mipmap-mdpi. 96*96 ic_launcher.png in mipmap-xhdpi. 144*144 ic_launcher.png in mipmap-xxhdpi. 192*192 ic_launcher.png in mipmap-xxxhdpi. Update 2019 Android … Read more

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

Live reloading reloads or refreshes the entire app when a file changes. For example, if you were four links deep into your navigation and saved a change, live reloading would restart the app and load the app back to the initial route. Hot reloading only refreshes the files that were changed without losing the state … Read more

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

I’ve encountered the same issue while following the React Native tutorial (developing on Linux and targeting Android). This issue helped me resolve the problem in following steps. (in project directory) mkdir android/app/src/main/assets react-native bundle –platform android –dev false –entry-file index.js –bundle-output android/app/src/main/assets/index.android.bundle –assets-dest android/app/src/main/res react-native run-android You can automate the above steps by placing them … Read more

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

Linux uses the inotify package to observe filesystem events, individual files or directories. Since React / Angular hot-reloads and recompiles files on save it needs to keep track of all project’s files. Increasing the inotify watch limit should hide the warning messages. You could try editing # insert the new value into the system config … Read more

Hide keyboard in react-native

The problem with keyboard not dismissing gets more severe if you have keyboardType=”numeric”, as there is no way to dismiss it. Replacing View with ScrollView is not a correct solution, as if you have multiple textInputs or buttons, tapping on them while the keyboard is up will only dismiss the keyboard. Correct way is to … Read more

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

The two approaches are not interchangeable. You should initialize state in the constructor when using ES6 classes, and define the getInitialState method when using React.createClass. See the official React doc on the subject of ES6 classes. class MyComponent extends React.Component { constructor(props) { super(props); this.state = { /* initial state */ }; } } is … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)