Skip to content

Instantly share code, notes, and snippets.

View Shan7anu's full-sized avatar
🎯
Focusing

Shantanu Singh Shan7anu

🎯
Focusing
  • Carelon Global Solutions
  • Bangalore, India
  • X @Shan7anu
View GitHub Profile
@Shan7anu
Shan7anu / react-native-offline-bundling-android
Created April 6, 2021 09:13 — forked from erikyuntantyo/react-native-offline-bundling-android
Build react-native offline bundling into android
# create assets folder in the current project
$ mkdir android/app/src/main/assets
# create bundle script
$ 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/
# execute command to run android to create debug apk
$ react-native run-android
# Or change to android folder
@Shan7anu
Shan7anu / AxiosExample.js
Last active November 30, 2019 06:08
Network Calls Using AXIOS (React Native)
import React from 'react';
import { FlatList, ActivityIndicator, Text, View } from 'react-native';
import axios from 'react-native-axios';
export default class AxiosExample extends React.Component {
constructor(props) {
super(props);
this.state = {
isLoading: true,
}
}
@Shan7anu
Shan7anu / FetchExample.js
Last active November 29, 2019 21:33
Network Calls Using Fetch (React Native)
import React from 'react';
import { FlatList, ActivityIndicator, Text, View } from 'react-native';
export default class FetchExample extends React.Component {
constructor(props) {
super(props);
this.state = { isLoading: true }
}
componentDidMount() {
fetch('https://facebook.github.io/react-native/movies.json')