Skip to content

⚛️ The simplest and lightest way to get the build code and and name version in react native

License

Notifications You must be signed in to change notification settings

e1016/react-native-build-vesion-getter

Repository files navigation

react-native-build-vesion-getter

✨ Get easy version code and name from your app without access any permissions or extra info (lightweight alternative to react-native-device-info basically), works on Android and iOS only.

Installation

npm i -s react-native-build-vesion-getter

Usage

import useVersion from 'react-native-build-vesion-getter'

function App() {
  const { name, code, done } = useVersion()

  return (
    <View>
      { done && <Text>{code} - {name}</Text> }
    </View>
  )
}
prop type default description
name string "" version name something like '4.79.3', this is an empty string before its done
code number 0 version code something like 18, its 0 before its done
done  boolean false this library get in async way the code and name so, before this values are getted is false, and helps to know when name and code are recovered or errored turning into true after that

Pd. yes, I notice the typo, it's 3AM we'll have to live with that until I get more free time

License

MIT


Made with create-react-native-library

About

⚛️ The simplest and lightest way to get the build code and and name version in react native

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published