New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

react-native-fs-cache-image

Package Overview
Dependencies
Maintainers
2
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-fs-cache-image

React Native Image Cache on File System

latest
Source
npmnpm
Version
1.0.4
Version published
Maintainers
2
Created
Source

React Native FS Cache Image

npm

react-native-fs-cache-image is a library for caching images in React Native applications. It uses the fs package to cache images locally on the device and allows for faster loading times by avoiding downloading the same image multiple times. The library is optimized for optimal caching performance, and provides a declarative API to make it easier to use. It also supports a variety of image formats, including jpeg, png, gif, and webp.

Features

  • Cache remote images in file system
  • Uses react-native-fs for file system access
  • Image loading indicator

Installation

Using npm:

npm i react-native-fs-cache-image --save

Using yarn:

yarn add react-native-fs-cache-image

Usage

Using the library is easy. You can use it in your React Native application like this:

import React, { Component } from 'react';
import { StyleSheet } from 'react-native';
import CacheImage from 'react-native-fs-cache-image';

export default class App extends Component {
  render() {
    return (
      <>
        <CacheImage
          source={{uri: 'http://placehold.it/350x150'}}
        />
      </>
    );
  }
}

Keywords

react-native

FAQs

Package last updated on 27 Feb 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts