How to use react-native-fast-image - 10 common examples

To help you get started, we’ve selected a few react-native-fast-image examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github DylanVann / react-native-fast-image / example / FastImageExample.js View on Github external
render() {
    // Force complete re-render.
    const key = uuid()
    // Busting image cache.
    const bust = `?bust=${key}`
    // Preload images.
    FastImage.preload([
      {
        uri: 'https://facebook.github.io/react/img/logo_og.png',
        headers: { Authorization: 'someAuthToken' },
      },
      {
        uri: 'https://facebook.github.io/react/img/logo_og.png',
        headers: { Authorization: 'someAuthToken' },
      },
    ])
    return (
github rainbow-me / rainbow / src / helpers / buildWalletSections.js View on Github external
const withUniqueTokenFamiliesSection = (language, uniqueTokens, data) => {
  // TODO preload elsewhere?
  if (!isPreloadComplete) {
    const imagesToPreload = sortImagesToPreload(
      data.map(buildImagesToPreloadArray)
    );
    isPreloadComplete = !!imagesToPreload.length;
    FastImage.preload(imagesToPreload);
  }

  return {
    collectibles: true,
    data,
    header: {
      title: lang.t('account.tab_collectibles'),
      totalItems: uniqueTokens.length,
      totalValue: '',
    },
    name: 'collectibles',
    renderItem: tokenFamilyItem,
    type: 'big',
  };
};
github phated / mxdbmobile / src / FastImage.js View on Github external
function make(uri, _) {
  return ReasonReact.wrapJsForReason(ReactNativeFastImage.default, {
              source: {
                uri: uri
              },
              resizeMode: "contain",
              style: {
                height: undefined,
                width: undefined,
                flex: 1
              }
            }, /* array */[]);
}
github syun0216 / goforeat / app / components / CommonComment.js View on Github external
{defaultImage: require('../asset/delicious-normal.png'), activeImage: require('../asset/delicious-press.png'), name: 'delicious', val: 5},
    ];
    const {currentStar,currentComment: {orderName, picture}} = this.state;
    const defaultImg = "https://img.xiumi.us/xmi/ua/18Wf8/i/98c314a76260a9634beecfd27c28770d-sz_80962.jpg?x-oss-process=style/xmr";
    console.log(this.state.commentTags);
    return (
      
        {/*<img style="{styles.topImg}">*/}
        
        
      
    )
  }
github SkyzohKey / M-Droid / src / services / RepositoryService.js View on Github external
.then(res => {
          if (res.info().status === 200) {
            FastImage.preload([{ uri: appData.featureGraphic }]);
          } else {
            appData.featureGraphic = null;
          }
        })
        .catch(err => console.log(err));
github SkyzohKey / M-Droid / src / components / SearchResultRow / index.js View on Github external
render() {
    const { appIconPath, appName, appSummary, onPress } = this.props;
    return (
      
    );
  }

react-native-fast-image

🚩 FastImage, performant React Native image component.

MIT
Latest version published 2 years ago

Package Health Score

61 / 100
Full package analysis