Skip to content

Instantly share code, notes, and snippets.

View hisothreed's full-sized avatar

Hussein O. Abdulnabi hisothreed

View GitHub Profile
@hisothreed
hisothreed / App.js
Created January 8, 2020 04:46
App.js part-1 final
import React, {useState, useRef} from 'react';
import MapView from 'react-native-maps';
import styled from 'styled-components/native';
import {SafeAreaView, TouchableOpacity, Text, View} from 'react-native';
import SearchOverlay from './src/components/SearchOverlay';
const Container = styled.View`
flex-grow: 1;
`;
@hisothreed
hisothreed / SearchOverlay.js
Created January 8, 2020 04:44
SearchOverlay part-1 final
import React, {useState, useEffect} from 'react';
import styled from 'styled-components/native';
import {Animated, StyleSheet, FlatList, Text} from 'react-native';
const SearchItem = styled.TouchableOpacity`
border-bottom-color: rgba(0, 0, 0, 0.05);
border-bottom-width: 1;
padding-vertical: 20;
padding-horizontal: 15;
`;
@hisothreed
hisothreed / App.js
Created January 8, 2020 03:21
App.js - 2
import React, {useState} from 'react';
import MapView from 'react-native-maps';
import styled from 'styled-components/native';
import {SafeAreaView, TouchableOpacity, Text, View} from 'react-native';
import SearchOverlay from './src/components/SearchOverlay';
const Container = styled.View`
flex-grow: 1;
`;
import React, {useState, useEffect} from 'react';
import styled from 'styled-components/native';
import {Animated, StyleSheet, FlatList, Text} from 'react-native';
const SearchItem = styled.TouchableOpacity`
border-bottom-color: rgba(0, 0, 0, 0.05);
border-bottom-width: 1;
padding-vertical: 20;
padding-horizontal: 15;
`;
@hisothreed
hisothreed / App.js
Last active January 8, 2020 05:06
App.js - 1
import React, {useState} from 'react';
import MapView from 'react-native-maps';
import styled from 'styled-components/native';
import {SafeAreaView, TouchableOpacity, Text} from 'react-native';
const Container = styled.View`
flex-grow: 1;
`;
const Header = styled.View`
@hisothreed
hisothreed / promisify.ts
Created September 16, 2019 22:34
Promisify decorator
<!-- DECORATOR IMPLEMENTATION -->
export function promisify(target, propertyName, propertyDesciptor) {
const method = propertyDesciptor.value;
propertyDesciptor.value = function(...args: any[]) {
return new Promise(resolve => {
return method.apply(this, [...args, resolve]);
});
};
return propertyDesciptor;
}