This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://stackoverflow.com/questions/7616461/generate-a-hash-from-string-in-javascript-jquery | |
export const hashOf = (str) => { | |
/*jshint bitwise:false */ | |
let i; | |
let l; | |
let hval = 0x811c9dc5; | |
// let hval = (seed === undefined) ? 0x811c9dc5 : seed; | |
const asString = true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { Image } from 'react-native'; | |
import { FileSystem } from 'expo'; | |
import { hashOf } from '../../utils/'; | |
class SmartImage extends React.PureComponent { | |
state = { source: this.props.source }; | |
componentDidMount() { |