Skip to content

Instantly share code, notes, and snippets.

View amandeepmittal's full-sized avatar

Aman Mittal amandeepmittal

View GitHub Profile
@boniattirodrigo
boniattirodrigo / login.js
Created June 25, 2017 18:44
A simple process to get, store and delete values from AsyncStorage.
import React, { Component } from 'react'
import {
View,
AsyncStorage,
TouchableHighlight,
Text,
StyleSheet,
} from 'react-native'
@catalinmiron
catalinmiron / xxx.sh
Created February 19, 2020 08:41
Uni install expo+npm
// In your bash/zsh/etc...
function universalInstall() {
echo "Running install with $@";
echo "- react-native-gesture-handler\n- react-native-reanimated\n- react-native-screens\n- react-native-safe-area-context\n- @react-native-community/masked-view\n"
$@ install react-native-gesture-handler react-native-reanimated react-native-screens react-native-safe-area-context @react-native-community/masked-view;
}
// Usage
universalInstall expo
@charlesxsh
charlesxsh / CustomReactNavigationTabbar.tsx
Last active June 22, 2020 01:40
Customize tab bar in react native using react navigation
import React from 'react';
import { Component } from 'react';
import {
TouchableOpacity,
Text,
View,
Image
} from 'react-native';
import { TabBarBottomProps, NavigationRoute } from 'react-navigation';
@aurorabbit
aurorabbit / progress.10s.sh
Last active August 5, 2020 00:16
Bitbar timely progress bar
#!/bin/sh
# add this to your bitbar directory
# don't forget to chmod +x
# width and characters for the progress bars
# feel free to configure these
width=30
fill_char="█"
empty_char="▁"
@brunolemos
brunolemos / App.tsx
Last active January 14, 2021 05:07
react-native-safe-area-context
import React from 'react'
import { StatusBar, Text, View } from 'react-native'
import { useSafeArea } from 'react-native-safe-area-context'
export function App() {
const safeAreaInsets = useSafeArea()
return (
<View
style={{
@leommoore
leommoore / ionic_publish_android_app.md
Last active June 8, 2021 10:46
Ionic Publish Android App

#Ionic Publish Android App

This is the process to publish an ionic android app.

  1. Make sure you set/increment the version number in config.xml ie 0.0.3.

  2. Make sure the android platform has been added

rules: {
'prettier/prettier': ['error'],
'no-use-before-define': 0,
'react/forbid-prop-types': 0,
'react/jsx-filename-extension': [1, { extensions: ['.js', '.jsx'] }],
'react/jsx-fragments': 0,
'react/jsx-props-no-spreading': 0,
'react/style-prop-object': 0,
'react/require-default-props': 0,
'react/prop-types': 0,
@cmmartin
cmmartin / Example-BouncingText.js
Last active October 17, 2021 11:13
React Native HOC for easily adding spring animations to your components
/*
* EXAMPLE USAGE
* This component is text that will bounce on mount and
* every time `this.props.someProperty` changes.
* Too bad react native doesn't support decorators yet :/
*/
import React, {
Component,
StyleSheet,
@jsjoeio
jsjoeio / notes.md
Last active November 3, 2021 14:31
Julian's Writing Workshop - 11/2/2021 - Notes

Raw Notes

These are my unstructured notes from the workshop. Read with caution (they're biased to my own interpretation).

Notes

1,000,000 Julian.com visitors

Part 1: What's your objective for your article?

Part 2: pair it with an objective

import React from "react";
import { View, SafeAreaView, Text, Dimensions } from "react-native";
import Animated, {
useSharedValue,
useAnimatedStyle,
useAnimatedScrollHandler,
interpolate,
interpolateColor,
Extrapolate,
} from "react-native-reanimated";