Skip to content

Instantly share code, notes, and snippets.

View dabit3's full-sized avatar
🎡
probably nothing

Nader Dabit dabit3

🎡
probably nothing
View GitHub Profile
@dabit3
dabit3 / dabblet.css
Created April 4, 2014 19:25
Untitled
@keyframes rotate{
from{
transform:rotate(0deg) translate(-10px) rotate(0deg);
background-color:green;
}
to{
transform:rotate(360deg) translate(-10px) rotate(-360deg);
background-color:yellow;
}
}
@dabit3
dabit3 / Part 1
Last active January 22, 2016 15:12
Creating A Custom Toast Module for React Native Part 1
'use strict';
import React, {
AppRegistry,
Component,
StyleSheet,
Text,
View,
TouchableHighlight,
Animated
} from 'react-native';
@dabit3
dabit3 / React Native Navigation examplea
Last active February 15, 2016 17:07
React Native Navigation examplea
var navigationSetup = React.createClass ({
renderScene = function (route, navigator) {
var routeId = route.id;
if (routeId === 'Login') {
return (<Login {...route.passProps} navigator={navigator} />);
}
import React, { Component } from 'react'
import { Router, Route, Link, IndexRoute, hashHistory, browserHistory, DefaultRoute, IndexLink } from 'react-router'
class App extends Component {
render () {
return (
<Router history={hashHistory}>
<Route path='/' component={Container}>
<IndexRoute component={Home} />
<Route path='/address' component={Address}>
@dabit3
dabit3 / AppDelegate.m
Created May 28, 2016 18:38
React Native Facebook sdk - Return to app after login.
/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
#import "AppDelegate.h"
@dabit3
dabit3 / ActionTypes.js
Last active June 17, 2016 14:50
React Native Navigator Experimental Part 2 — Implementing Redux ActionTypes.js
export const PUSH_ROUTE = 'PUSH_ROUTE'
export const POP_ROUTE = 'POP_ROUTE'
@dabit3
dabit3 / navActions.js
Created June 17, 2016 14:51
React Native Navigator Experimental Part 2 — Implementing Redux navActions.js
import { POP_ROUTE, PUSH_ROUTE } from '../constants/ActionTypes'
export function push (route) {
return {
type: PUSH_ROUTE,
route
}
}
export function pop () {
@dabit3
dabit3 / index.js
Created June 17, 2016 14:54
React Native Navigator Experimental Part 2 — Implementing Redux reducers/index.js
import { combineReducers } from 'redux'
import navReducer from './navReducer'
const rootReducer = combineReducers({
navReducer
})
export default rootReducer
@dabit3
dabit3 / configureStore.js
Created June 17, 2016 14:54
React Native Navigator Experimental Part 2 — Implementing Redux configureStore.js
import { createStore } from 'redux'
import rootReducer from '../reducers'
export default function configureStore () {
const store = createStore(rootReducer)
if (module.hot) {
module.hot.accept(() => {
const nextRootReducer = require('../reducers/index').default
store.replaceReducer(nextRootReducer)
@dabit3
dabit3 / Button.js
Created June 17, 2016 14:55
React Native Navigator Experimental Part 2 — Implementing Redux Button.js
import React from 'react'
import { Text, TouchableHighlight, StyleSheet } from 'react-native'
export default ({label, onPress}) => (
<TouchableHighlight
underlayColor='#35b5ff'
onPress={onPress} style={styles.button}>
<Text style={styles.label}>{label}</Text>
</TouchableHighlight>
)