This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

react-native-smartimage

0.0.1 • Public • Published

SmartImage

need screens here

Installation

  • Using npm:

    npm install git+https://git@github.com/volga-volga/react-native-smartimage.git`
    

NOTE:

It use react-native-fetch-blob and react-native-fs. After installation you need to call

react-native link

Props

    static propTypes = {
        source: PropTypes.string,
        // When use both source and localSource, localSource will be shown.
        localSource: Image.propTypes.source, 
        placeholder: Image.propTypes.source,
        renderPlaceholder: PropTypes.element,
        style: Image.propTypes.style,
        placeholderStyle: View.propTypes.style,
        imageProps: Image.propTypes,
    }

Example

import SmartImage from 'react-native-smartimage';

...

render() {
    return (
        <SmartImage 
            style = {{
                borderRadius: 8,
                height: 40,
                width: 40,
            }}
            placeholderStyle = {{
                bacgroundColor: 'green'
            }}
            imageProps = {{
                blurRadius: 10
            }}
            // Use for cache image (only network images)
            source = {urlToImage}
            // Use for local images or images without cache
            localSource = {{uri: pathToImage}}
            />    
    )
}

Package Sidebar

Install

npm i react-native-smartimage

Weekly Downloads

2

Version

0.0.1

License

none

Last publish

Collaborators

  • ownikss