@sekizlipenguen/react-native-helpers

0.0.2 • Public • Published

react-native-helpers

IMAGE HELPERS

Pre-required modules;

yarn add react-native-fast-image

Example SPFastImage loading + auto height

const [time, setTime] = useState(Date.now());
    
<SPFastImage
source={{uri: 'https://www.gstatic.com/webp/gallery/5.jpg?t=' + time}}
width={200}
/>

Example SPFastImage loading(width,height)

<SPFastImage
    source={{uri: 'https://www.gstatic.com/webp/gallery/5.jpg?t=' + time}}
    style={{
        borderRadius: 15,
        height: 200,
        width: 200,
    }}
    resizeMode={'cover'}
/>

Example SPFastImage loading(aspectRatio)

<SPFastImage
    source={{uri: 'https://www.gstatic.com/webp/gallery/5.jpg?t=' + time}}
    style={{
        borderRadius: 15,
        aspectRatio: 375 / 300 // or 4/3 or 4/4
    }}
    resizeMode={'cover'}
/>

Example SPImageBackground

<SPImageBackground
    style={{flex: 1}} source={{uri: 'https://www.gstatic.com/webp/gallery/5.jpg?t=' + time}}
    resizeMode={'cover'}
>
  children
</SPImageBackground>

BasicTimer

<BasicTimer duration={10} complete={() => alert('completed')}>
    {
        (time) => (
            <Text>{time} seconds</Text>
        )
    }
</BasicTimer>

GLOBAL HELPERS

Key Type Description
screenWidth function screen Width
screenHeight function screen Height

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.2
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.2
    0
  • 0.0.1
    0

Package Sidebar

Install

npm i @sekizlipenguen/react-native-helpers

Weekly Downloads

0

Version

0.0.2

License

MIT

Unpacked Size

9.75 kB

Total Files

8

Last publish

Collaborators

  • sekizpenguen