Saturday, 13 January 2018

Debugging

Status : Draft

React Developer Tools


Jika instalasi react-devtools dengan cara yang dijelaskan di [1]  tidak berhasil, coba dengan cara berikut :

$sudo npm install -g react-devtools --unsafe-perm=true --allow-root

Melihat Log di Console 


Kita juga dapat melihat log di console, dengan cara menjalankan perintah berikut :

$ react-native log-ios
$ react-native log-android

Referensi

  1. Debugging, https://facebook.github.io/react-native/docs/debugging.html

Friday, 12 January 2018

Atom : Salah Satu Sahabat Developer React Native

Status : Draft


Referensi

  1. Nuclide, A unified developer experience for software development, https://nuclide.io/
  2. react-native-snippets, React Native snippets for Atom and Nuclide, https://atom.io/packages/react-native-snippets

Friday, 8 December 2017

Berkenalan dengan Expo : Salah Satu Sahabat Developer React Native

Status : Draft 

Catatan penting, Expo mungkin tidak cocok dengan kebutuhan Anda, pastikan untuk membaca Why not Expo? [3] terlebih dahulu.

Utilitas ini sangat memudahkan, jika ingin membuat standalone app untuk dipublish di Playstore atau AppStore, bisa membaca [2].

Jika dalam mengikuti instalasi exp di [2] , menggunakan npm :

npm install -g exp

mengalami error, seperti ini misalnya :

> @expo/traveling-fastlane-linux@1.0.15 preinstall /usr/local/lib/node_modules/exp/node_modules/@expo/traveling-fastlane-linux
> node platform.js

/usr/local/bin/exp -> /usr/local/lib/node_modules/exp/bin/exp.js

> spawn-sync@1.0.15 postinstall /usr/local/lib/node_modules/exp/node_modules/spawn-sync
> node postinstall


> @expo/ngrok@2.3.0 postinstall /usr/local/lib/node_modules/exp/node_modules/@expo/ngrok
> node ./postinstall.js

ngrok - error unpacking binary { Error: EACCES: permission denied, open '/usr/local/lib/node_modules/exp/node_modules/@expo/ngrok/bin/ngrok'
  errno: -13,
  code: 'EACCES',
  syscall: 'open',
  path: '/usr/local/lib/node_modules/exp/node_modules/@expo/ngrok/bin/ngrok' }
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @expo/traveling-fastlane-darwin@1.0.15 (node_modules/exp/node_modules/@expo/traveling-fastlane-darwin):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @expo/traveling-fastlane-darwin@1.0.15: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @expo/ngrok@2.3.0 postinstall: `node ./postinstall.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @expo/ngrok@2.3.0 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.


coba lakukan instalasi menggunakan yarn :

sudo yarn global  add exp

Referensi

  1. Create React Native apps with no build configuration, https://github.com/react-community/create-react-native-app
  2.  Building Standalone Apps, https://docs.expo.io/versions/latest/guides/building-standalone-apps.html
  3. Why not Expo?, https://docs.expo.io/versions/latest/introduction/why-not-expo.html

Thursday, 7 December 2017

Belajar dari UIExplorer

Status : Draft

Ketika menulis ini, link ke UIExplorer yang ada di [1] invalid, di source tree reactnatice sudah tidak ada lagi folder Examples.

Tapi jika ingin mencoba langsung, tanpa perlu melakukan kompilasi, langsung dapat mendownload  React Native UIExplorer di PlayStore.

Referensi

  1. UIExplorer, The UIExplorer is a sample app that showcases React Native views and modules, http://www.reactnative.com/uiexplorer/

Wednesday, 6 December 2017

Berkenalan dengan React Native Layouts

Status : Draft

Setelah checkout Starter for a React Native for Web project (RN4Web) [2], ternyata struktur code nya sudah berubah, tidak sama lagi dengan yang dijelaskan di [1].

Referensi


  1. Get Started With React Native Layouts, https://code.tutsplus.com/tutorials/get-started-with-layouts-in-react-native--cms-27418
  2. Starter for a React Native for Web project (RN4Web) , https://github.com/grabcode/react-native-web-starter

Friday, 8 September 2017

Troubleshooting : Could not connect to development server


Jika Anda mendapatkan error seperti ini, pastikan anda menjalankan perintah react-native start sebelum menjalankan perintah react-native run-android.

react-native start
react-native run-android

Bekerja dengan Kamera di ReactNative

Status : Draft


Referensi

  1. Capturing Pictures in React Native, https://snowball.digital/Blog/Capturing-Pictures-in-React-Native
  2. Mastering the Camera Roll in React Native, https://medium.com/react-native-training/mastering-the-camera-roll-in-react-native-13b3b1963a2d