Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@freakycoder/react-native-helpers

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@freakycoder/react-native-helpers

Easy to use & awesome helpers for React Native.

Source
npmnpm
Version
0.0.12
Version published
Weekly downloads
593
35.08%
Maintainers
1
Weekly downloads
 
Created
Source
React Native Helpers

Easy to use & awesome helpers for React Native.

npm version npm Platform - Android and iOS License: MIT styled with prettier

React Native Helpers

Installation

Add the dependency:

React Native:

npm i @freakycoder/react-native-helpers

Peer Dependencies

IMPORTANT! You need install them.
"react": ">= 16.x.x",
"react-native": ">= 0.55.x",

DeviceInfo Usage

import {
  Screen,
  ScreenWidth,
  ScreenHeight,
  isIOS,
  isAndroid
} from "react-native-helpers";

<View>
  <Container title="Device OS" subtitle={isIOS ? "iOS" : "Android"} />
  <Container title="Screen Height" subtitle={ScreenHeight} />
  <Container title="Screen Width" subtitle={ScreenWidth} />
</View>

Noth (iPhoneX & StatusBar) Usage

import {
  isIPhoneXFamily,
  hasNotch,
  isIPhoneX,
  isIPhoneXr,
  isIPhoneXs,
  isIPhoneXsMax,
  getStatusBarHeight
} from "react-native-helpers";

<View>
   <Container
     title="hasNotch?"
     subtitle={hasNotch() ? "iPhone X Family" : "iPhone Family"}
   />
   <Container
     title="isIPhoneXsMax?"
     subtitle={isIPhoneXsMax(Screen) ? "iPhone XsMax" : "NOT iPhone XsMax"}
   />
   <Container
     title="getStatusBarHeight?"
     subtitle={getStatusBarHeight()}
   />
</View>

Normalize Text Usage

Method to normalize size of fonts across devices

import normalizeText from "./lib/src/helpers/normalize/normalizeText";

fontSize: normalizeText(24),

Credits

NormalizeText is completely coming from react-native-elements. All credits goes to @xiaoneng and RN Elements team. Thank you so much guys.

ToDos

  • LICENSE
  • Write an article about the lib on Medium

Author

FreakyCoder, kurayogun@gmail.com

License

React Native Helpers Library is available under the MIT license. See the LICENSE file for more info.

Keywords

ios

FAQs

Package last updated on 11 May 2019

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