Skip to content

Instantly share code, notes, and snippets.

View salujaharkirat's full-sized avatar

Harkirat Saluja salujaharkirat

View GitHub Profile
/**
Author - Harkirat Saluja
Git - https://bitbucket.org/salujaharkirat/
**/
"use strict";
import React from "react";
import configureStore from 'redux-mock-store';
import {Auth} from "screens";
/**
Author - Harkirat Saluja
Git - https://bitbucket.org/salujaharkirat/
**/
"use strict";
import {Platform} from "react-native";
import axios from "axios";
import {decamelizeKeys} from "humps";
/**
Author - Harkirat Saluja
Git - https://bitbucket.org/salujaharkirat/
**/
"use strict";
import Config from "react-native-config";
import GoogleSignIn from "react-native-google-sign-in";
/**
Author - Harkirat Saluja
Git - https://bitbucket.org/salujaharkirat/
**/
"use strict";
import React from "react";
import {Alert} from "react-native";
import {connect} from "react-redux";
|- app
|- __tests__
|- tests
|- screens
|- Auth.container.js
@salujaharkirat
salujaharkirat / Auth-Folder.js
Created July 19, 2018 08:58
Auth folder structure
|- app
|- screens
|- Auth
|- assets
|- Auth.container.js
|- Auth.js
|- authorizeGoogle.js
|- index.js
|- styles.js
|- __mocks__
| app
|- screens
|- __tests__
|- api
|- config
|...
{
"presets": ["react-native"],
"retainLines": true,
"plugins": [
[
"module-resolver",
{
"root": ["./app"]
}
]
@salujaharkirat
salujaharkirat / welcome.dart
Last active June 11, 2018 07:43
Welcome.dart
import 'package:flutter/material.dart';
import 'widgets/first_button/index.dart';
import 'widgets/second_button/index.dart';
class Welcome extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new Scaffold( // 1
@salujaharkirat
salujaharkirat / redux-thunk-actions.js
Created October 28, 2017 21:31
Redux thunk actions
import axios from "axios";
import API_END_POINT from "../config/index";
const fetchCharacters = () => {
return (dispatch) => {
axios.get(API_END_POINT)
.then((response) => {
dispatch(receiveCharacters(response.data.results));
})