Skip to content

Instantly share code, notes, and snippets.

This file has been truncated, but you can view the full file.
/*
Jimp v0.2.28
https://github.com/oliver-moran/jimp
Ported for the Web by Phil Seaton
The MIT License (MIT)
Copyright (c) 2014 Oliver Moran
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
import axios from 'axios'
import humps from 'humps'
import Config from 'react-native-config'
import { store } from '../store'
import { setUserSession, signOut } from '../actions/auth'
const API_URL = Config.API_URL
const createAxiosClient = () => {
const userSession = store.getState().auth.userSession

Clean the utils and helpers folders

  1. Remove helpers/immutable.js: The ideal scenario would be to work always with immutable objects, so let's get rid of this helper :)
  2. Identify more improvements on those folders, check if code it's not being used, etc.

Move the corresponding components to a Page folder

Move the "pages" components to the Page folder. Naming convention: end file names with 'Page' postfix, eg. UsersPage.

Duck convention for naming action constants

Update to upperCase the last part of the constant

import ApiClient from '../api';
import { loginOptions, landing } from './navigationRedux';
import { persistance } from '../helpers';
// ACTIONS
export const CREATE_USER_PENDING = 'Kaigi/Users/CREATE_USER_PENDING';
export const CREATE_USER_SUCCESS = 'Kaigi/Users/CREATE_USER_SUCCESS';
export const CREATE_USER_FAILURE = 'Kaigi/Users/CREATE_USER_FAILURE';
export const USER_LOGOUT = 'Kaigi/Users/USER_LOGOUT';
export const UPDATE_USER_ORGS_PENDING = 'Kaigi/Users/UPDATE_USER_ORGS_PENDING';
export const UPDATE_USER_ORGS_SUCCESS = 'Kaigi/Users/UPDATE_USER_ORGS_SUCCESS';