Skip to content

Instantly share code, notes, and snippets.

Himel Nag Rana himelnagrana

Block or report user

Report or block himelnagrana

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Cefalo School - React Native Class 11.md

Cefalo School - React Native Class 11


Running on Devices

ANDROID

  • Enable debugging over usb -- Settings > About Phone -- Tap Build Number row seven times -- Go back one step and Developer Options will be open [Based on Android variants, it might be on top menu or under additional settings] -- Then from Developer Options enable the two items:
@himelnagrana
himelnagrana / ExportingImage.m
Created Jan 3, 2018
Passing Properties from Native to RN
View ExportingImage.m
NSArray *imageList = @[@"http://www.thinkgeek.com/images/products/frontsquare/jvkn_sw_beak_back_buddy.jpg",
@"https://images-na.ssl-images-amazon.com/images/I/41yAU9p60jL._SY300_.jpg"];
NSDictionary *props = @{@"images" : imageList};
RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
moduleName:@"ImageBrowserTest"
initialProperties:props];
View CalendarManager.h
#import <React/RCTBridgeModule.h>
@interface CalendarManager : NSObject <RCTBridgeModule>
@end
@himelnagrana
himelnagrana / EmpManToast.js
Last active Jan 3, 2018
Android Native Module Example
View EmpManToast.js
/**
* This exposes the native EmpManToast module as a JS module. This has a
* function 'show' which takes the following parameters:
*
* 1. String message: A string with the text to toast
* 2. int duration: The duration of the toast. May be ToastExample.SHORT or
* ToastExample.LONG
*/
import {NativeModules} from 'react-native';
View Cefalo School - React Native Class 07.md

Cefalo School - React Native Class 07


REACT NATIVE APIs

  • React Native provides a number of built-in components.There are a number of APIs for both the platforms (common and individuals).

Components and APIs

@himelnagrana
himelnagrana / Cefalo School - React Native Class 06.md
Last active Nov 29, 2017
Cefalo School - React Native Class 06
View Cefalo School - React Native Class 06.md

Cefalo School - React Native Class 06


BASICS

  • Build native mobile apps using JavaScript and React

Sample Code 1

  • With React Native, you don't build a mobile web app, an HTML5 app, or a hybrid app. You build a real mobile app that's indistinguishable from an app built using Objective-C or Java.
View rn_cefalo_school_lecture_6_code_sample_2.js
import React, { Component } from 'react';
import { Image, ScrollView, Text } from 'react-native';
class AwkwardScrollingImageWithText extends Component {
render() {
return (
<ScrollView>
<Image
source={{uri: 'https://i.chzbgr.com/full/7345954048/h7E2C65F9/'}}
style={{width: 320, height:180}}
View rn_cefalo_school_class_6_code_sample_1.js
import React, { Component } from 'react';
import { Text, View } from 'react-native';
class WhyReactNativeIsSoGreat extends Component {
render() {
return (
<View>
<Text>
If you like React on the web, you'll like React Native.
</Text>
@himelnagrana
himelnagrana / Assignment on ReactJS
Last active Nov 22, 2017
Assignment on ReactJS
View Assignment on ReactJS
<h1 id="assignment-on-reactjs">Assignment on ReactJS</h1>
<p>Hey! This is the first assignment in the <strong>React Native course</strong><a href="#fn:reactnativecourse" id="fnref:reactnativecourse" title="See footnote" class="footnote">1</a>. </p>
<hr>
<h2 id="description">Description</h2>
View Pretty bash profile
if [[ $COLORTERM = gnome-* && $TERM = xterm ]] && infocmp gnome-256color >/dev/null 2>&1; then
export TERM=gnome-256color
elif infocmp xterm-256color >/dev/null 2>&1; then
export TERM=xterm-256color
fi
if tput setaf 1 &> /dev/null; then
tput sgr0
if [[ $(tput colors) -ge 256 ]] 2>/dev/null; then
MAGENTA=$(tput setaf 9)
You can’t perform that action at this time.