Travis Tran

Travis Tran


25+ JavaScript Shorthand Coding Techniques

This really is a must read for any JavaScript developer. I have written this guide to shorthand JavaScript coding techniques that I have picked up over the years. To help you understand what is going on, I have included the longhand versions to give some coding perspective.

Continue reading

React Native – Setting up the environment

Integrated Development Environments

First things first. In order to get create React Native applications you are going to need the right IDEs.

Xcode for iOS

Android Studio for Android

React Native with IntelliJ IDEA

Configuring Android Emulator:

touch ~/.zshenv
open ~/.zshenv

Then in paste the following at the bottom of your newly opened file:

export ANDROID_HOME=/Users/$(whoami)/Library/Android/sdk/
export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools

(macOS) Type source ~/.zshenv to reload .zshenv and update any functions you add.

source ~/.zshenv

For a list of AVD names, enter the following command:

emulator -list-avds

Here’s the basic command-line syntax for starting a virtual device from a terminal prompt:

emulator @avd_name [ {-option [value]} … ]

# Example
emulator -avd Nexus_5X_API_23 -netdelay none -netspeed full

You can create an alias command to start emulator easier. In macOS, add the following lines at the bottom of .zshrc :

touch ~/.zshrc
open ~/.zshrc
alias run-android-emulator='emulator -avd Nexus_6_API_29 -netdelay none -netspeed full'

Reload and run:

source ~/.zshrc

To emulate the iOS platform, you need to install the ios-sim command-line tool globally. You can do it through the Node Package Manager (npm), see npm and Yarn, or by running the sudo npm install ios-sim -g command, depending on your operating system.

sudo npm install ios-sim -g

In the Arguments field, type the arguments to be passed to React Native, for example, specify the simulator type through the ‑‑simulator flag: ‑‑simulator="iPhone 4s".

React vs. Angular: The Complete Comparison

Do you want to learn about and discover the differences between React vs. Angular? Then keep on reading! I am going to explain to you the similarities, differences, pros, and cons of both React and Angular in this article. You don’t need to be an expert programmer to understand this post but it is encouraged that you are familiar with JavaScript.

Continue reading
Glad to have you at
Welcome to TravisBot