Skip to content

Instantly share code, notes, and snippets.

@anasAlsalol
anasAlsalol / API.js
Created November 16, 2018 21:21
redux-saga - Login Example - React Native
// a library to wrap and simplify api calls
import apisauce from 'apisauce';
import { Constants } from '@common';
const { API } = Constants;
const create = () => {
const api = apisauce.create({
// base URL is read from the "constructor"
baseURL: API,
@anasAlsalol
anasAlsalol / multi_section.jsx
Created July 15, 2018 15:34 — forked from sergioutama/multi_section.jsx
Multi section with horizontal FlatList
export default class Screen extends React.Component {
renderItem({ item }) {
return <Row stall={item} didSelectRow={this.didSelectRow} />;
}
renderHorizontalSection = ({ item }) => {
return (
<FlatList
data={["horizontaol_item1","horizontal_item2"]}
@anasAlsalol
anasAlsalol / DrawerNavigation.js
Created July 5, 2018 07:47
drawerNavigator and stackNavigator and SwitchNavigator in one project
import React from 'react'
import {createStackNavigator , createDrawerNavigator} from 'react-navigation';
import HomeScreen from './HomeScreen'
import SideBar from './SideBar'
import {I18nManager} from "react-native";
// Manifest of possible screens