Skip to content

Instantly share code, notes, and snippets.

View Sam1301's full-sized avatar

Saumya Bhatnagar Sam1301

View GitHub Profile
@Sam1301
Sam1301 / SOC.md
Last active February 24, 2018 11:46
@Sam1301
Sam1301 / RerenderTest.js
Last active January 2, 2019 11:04 — forked from joshma/WhyDidYouUpdateMixin.js
Test duplicate renders of your components with this HOC
// originally implemented as a mixin,
// taken from https://gist.github.com/joshma/6753333dd38a6010f9a6#file-whydidyouupdatemixin-js
// modified to make a higher-order component
/* eslint-disable no-console */
import _ from 'underscore';
import React, { Component, PureComponent } from 'react';
function isRequiredUpdateObject(o) {
return Array.isArray(o) || (o && o.constructor === Object.prototype.constructor);
/* @flow */
import React, { Component } from 'react';
import { View, StyleSheet, Platform, Alert } from 'react-native';
import { connect } from 'react-redux';
import PhotoView from 'react-native-photo-view';
import { injectIntl, intlShape } from 'react-intl';
import boundActions from '../boundActions';
import share from './share';
import { downloadFile } from '../api';