How to use the react-native-fast-image.priority function in react-native-fast-image

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 steniowagner / mindCast / src / components / common / interests / InterestsListItem.js View on Github external
const PodcastImage = styled(FastImage).attrs(({ uri }) => ({
  source: {
    priority: FastImage.priority.high,
    uri,
  },
}))`
  width: 100%;
github Mangeneh / akkaskhooneh-frontend / src / components / CameraRollPicker / ImageItem.js View on Github external
render() {
    const {
      uri, selected,
    } = this.props;
    const priority = selected ? FastImage.priority.high : FastImage.priority.normal;
    return (
       this.handleClick(uri)}
      >
github DylanVann / react-native-fast-image / example / FastImageExample.js View on Github external
style={styles.scrollContainer}
          contentContainerStyle={styles.scrollContentContainer}
        >
github rainbow-me / rainbow / src / helpers / buildWalletSections.js View on Github external
return family.tokens.map((token, rowIndex) => {
    let priority = FastImage.priority[isTopFold ? 'high' : 'normal'];

    if (isTopFold && isLargeFamily) {
      if (rowIndex <= largeFamilyThreshold) {
        priority = FastImage.priority.high;
      } else if (isJumboFamily) {
        const isMedium =
          rowIndex > largeFamilyThreshold && rowIndex <= jumboFamilyThreshold;
        priority = FastImage.priority[isMedium ? 'normal' : 'low'];
      } else {
        priority = FastImage.priority.normal;
      }
    }

    const images = token.map(({ image_preview_url, uniqueId }) => {
      if (!image_preview_url) return null;
      return {
github steniowagner / bon-appetit-app / src / components / common / dishe-detail / components / ReviewItemList.js View on Github external
ellipsizeMode: 'tail',
})`
  color: ${({ theme }) => theme.colors.darkText};
  font-size: ${({ theme }) => theme.metrics.getWidthFromDP('3.8%')}px;
  font-family: CircularStd-Bold;
`;

const ProfileAvatarWrapper = styled(View)`
  width: 20%;
  height: 100%;
  justify-content: center;
`;

const ProfileAvatar = styled(FastImage).attrs({
  source: ({ uri }) => ({ uri }),
  priority: FastImage.priority.high,
})`
  margin: ${({ theme }) => `${theme.metrics.largeSize}px 0 ${theme.metrics.largeSize}px 0`}
  width: 48px;
  height: 48px;
  border-radius: 24px;
`;

const ReviewText = styled(Text).attrs({
  numberOfLines: 3,
  ellipsizeMode: 'tail',
})`
  margin-top: ${({ theme }) => {
    const marginTop = (Platform.OS === 'android' ? theme.metrics.extraSmallSize / 2 : theme.metrics.extraSmallSize);
    return marginTop;
  }}px;
  color: ${({ theme }) => theme.colors.subText};
github karanpratapsingh / Proximity / app / layout / misc / NativeImage.tsx View on Github external
const NativeImage: React.FC = ({ uri, style }) => {

  if (!uri) return

react-native-fast-image

🚩 FastImage, performant React Native image component.

MIT
Latest version published 2 years ago

Package Health Score

58 / 100
Full package analysis