Skip to content
This repository was archived by the owner on Apr 15, 2025. It is now read-only.

Commit a157e69

Browse files
committed
Update docs to scoped package
1 parent 1bdcf25 commit a157e69

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ React Native Higher Order Component that adds advanced caching functionality to
1515
## Installation
1616

1717
```bash
18-
$ npm install --save react-native-image-cache-hoc
18+
$ npm install --save @mnightingale/react-native-image-cache-hoc
1919
```
2020

2121
Or
2222

2323
```bash
24-
$ yarn add react-native-image-cache-hoc
24+
$ yarn add @mnightingale/react-native-image-cache-hoc
2525
```
2626

2727
Then, because this package has a depedency on [react-native-fs](https://github.com/itinance/react-native-fs) you will need to link this native package by running:
@@ -50,7 +50,7 @@ React Native Image Cache HOC creates an advanced image component, \<CacheableIma
5050
import React, { Component } from 'react'
5151
import { StyleSheet, Text, View, Image } from 'react-native'
5252

53-
import { imageCacheHoc } from 'react-native-image-cache-hoc'
53+
import { imageCacheHoc } from '@mnightingale/react-native-image-cache-hoc'
5454

5555
/**
5656
* Pass the native <Image> component into imageCacheHoc() to create the advanced image component <CacheableImage>.
@@ -216,7 +216,7 @@ The CacheableImage class returned by React Native Image Cache HOC includes a cou
216216
Use this method if you need to download a file to the local filesystem prior to rendering \<CacheableImage\> for some reason (perhaps to pre-warm the local cache). If calling this method repeatedly to cache a long list of files, be sure to use a queue and limit concurrency so your app performance does not suffer.
217217

218218
```js
219-
import { imageCacheHoc } from 'react-native-image-cache-hoc'
219+
import { imageCacheHoc } from '@mnightingale/react-native-image-cache-hoc'
220220
const CacheableImage = imageCacheHoc(Image)
221221
CacheableImage.cacheFile('https://i.redd.it/17ymhqwgbswz.jpg').then((localFileInfo) => {
222222
console.log(localFileInfo)
@@ -235,7 +235,7 @@ CacheableImage.cacheFile('https://i.redd.it/hhhim0kc5swz.jpg', true).then((local
235235
Delete all locally stored image files created by react-native-image-cache-hoc (cache AND permanent). Calling this method will cause a performance hit on your app until the local files are rebuilt.
236236

237237
```js
238-
import { imageCacheHoc } from 'react-native-image-cache-hoc'
238+
import { imageCacheHoc } from '@mnightingale/react-native-image-cache-hoc'
239239
const CacheableImage = imageCacheHoc(Image)
240240
CacheableImage.flush().then((flushResults) => {
241241
console.log(flushResults)
@@ -251,7 +251,7 @@ React Native Image Cache HOC must be run in a native environment to work correct
251251
**Add the following to your jest mocks:**
252252

253253
```js
254-
jest.mock('react-native-image-cache-hoc', () => {
254+
jest.mock('@mnightingale/react-native-image-cache-hoc', () => {
255255
const mockComponent = require('react-native/jest/mockComponent')
256256
const MockCacheableImage = mockComponent('Image')
257257

0 commit comments

Comments
 (0)