8.4.1 • Published 3 years ago

react-native-common-utils v8.4.1

Weekly downloads
40
License
ISC
Repository
github
Last release
3 years ago

This is a collection of useful classes for RN projects.

  1. Installation.
  2. Package contents.
  3. Version history.

Installation

Install with:

npm i react-native-common-utils

Package contents

  1. ApplicationSession (deprecated)
  2. ApplicationSession2 (deprecated, please use @robinbobin/react-native-application-session instead)
  3. EventHandlingHelper
  4. NativeEventEmitterWrapper
  5. StaticUtils

StaticUtils

A collection of different static utility methods extending StaticUtils from simple-common-utils.

import { StaticUtils } from "react-native-common-utils";
  • getLocaleId()

    Gets the current locale id.

     StaticUtils.getLocaleId(); // GB
  • isAndroid()

    	Returns `true` if the app is running on Android, `false` otherwise.
  • isIOS()

    	Return `true` if the app is running on iOS, `false` otherwise.
  • spinkitColor()

    Taking an RGBA value, returns a string of the form #rrggbb (as react-native-spinkit recognizes).

     StaticUtils.spinkitColor(10); // #000000
     StaticUtils.spinkitColor(0xFF487210); // #ff4872

Version history

Version numberChanges
v8.4.1ApplicationSession2 deprecated.
v8.4.0Native modules deleted. This is a breaking change, but who cares still
v8.3.0ApplicationSession2 added.
v8.2.0StaticUtils.isIOS() added.
v8.1.0StaticUtils.isAndroid() added.
v8.0.01. Many modules removed.2. The package depends only on simple-common-utils@^2.2.0.
v7.2.1@react-native-community -> @react-native-async-storage for async-storage
v7.2.0EventHandlingHelper.invokeListeners(): all the arguments are passed to inner listeners, not only data.
v7.1.11. AsyncStorage wasn't imported as a default object.2. @react-native-community/async-storage is made a peer dependency.
v7.1.0AsyncStorage imported from @react-native-community/async-storage.
v7.0.1react-native-localization moved to peerDependencies.
v7.0.0Backwards-incompatible changes:1. ListViewHelper / styles.listView removed.2. AlterStyles removed.3. core-decorators and @autobind are no longer used.
v6.0.11. AlterStyles deprecated in favour of combineStyles() from react-native-common-ui-components/js/styles.js.2. @babel/plugin-proposal-decorators is specified as a dev dependency and the postinstall script is deleted.
v6.0.01. The latest version of react-native-localization is specified in package.json.2. Backwards-incompatible change in strings.js: strings.formatString() is no longer available if a sub-object name was specified. strings.all.formatString() has to be used instead.
v5.1.01. An iOS-only bug fixed in ApplicationSession.manage().2. State changes can be optionally logged to the console. An argumentApplicationSession._setSessionType()
v5.0.0Backwards-incompatible change: styles.screen is superseded by styles.screen.container.
v4.1.01. ApplicationSession added.2. styles.screen added.
v4.0.0Backwards-incompatible change: babel-plugin-transform-decorators-legacy is removed from dependencies to allow for Babel 7 usage. End user instructions are given through the postinstall event.
v3.3.1Preferences.Data.
v3.2.1 
v3.2.0Added the JSONPreference class to store JSON objects as strings.
v3.1.0 
v3.0.01. Backwards-incompatible change: when using react-native-common-ui-components, styles must be imported from react-native-common-ui-components/js/styles.2. AlterStyles.combineEx() added.3. Readme updated.
v2.1.1Readme updated.
v2.1.01. Readme updated.2. ListViewHelper.setEmptyItemsRenderer() is added.
v2.0.2Invalid imports fixed.
v2.0.1client-side-common-utils deprecated; switched to simple-common-utils.
v2.0.0Backwards-incompatible changes:1. UI Components moved to react-native-common-ui-components.2. Google Drive API wrapper moved to react-native-google-drive-api-wrapper.3. SQL query builder moved to simple-sql-query-builder. 4. ArrayStringifier, DottedStringObject and utf8 moved to client-side-common-utils.
v1.0.111. Readme updated.2. react-native-extended-stylesheet and react-native-localization specified as dependencies.
v1.0.6 - v1.0.10Readme updated.
v1.0.51. Readme updated.2. Components/Button: arbitrary children supported.
v1.0.2 - v1.0.4Readme updated.
v1.0.1Readme added.
v1.0.0Initial release.

Written with StackEdit.

8.4.1

3 years ago

8.4.0

3 years ago

8.3.0

3 years ago

8.1.0

3 years ago

8.2.0

3 years ago

8.0.0

3 years ago

7.2.1

3 years ago

7.2.0

4 years ago

7.1.1

5 years ago

7.1.0

5 years ago

7.0.1

5 years ago

7.0.0

5 years ago

6.0.1

5 years ago

5.2.0

6 years ago

5.1.0

6 years ago

5.0.0

6 years ago

4.1.0

6 years ago

4.0.1

6 years ago

4.0.0

6 years ago

3.4.2

6 years ago

3.3.2

6 years ago

3.3.1

6 years ago

3.2.0

6 years ago

3.1.0

6 years ago

3.0.0

7 years ago

2.1.1

7 years ago

2.1.0

7 years ago

2.0.2

7 years ago

2.0.1

7 years ago

2.0.0

7 years ago

1.0.11

7 years ago

1.0.10

7 years ago

1.0.9

7 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago

0.2.0

7 years ago