Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-native-ultimate-config

Package Overview
Dependencies
Maintainers
1
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-ultimate-config

The ultimate config you ever need for your react-native app

  • 3.1.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4.2K
increased by8.3%
Maintainers
1
Weekly downloads
 
Created
Source

react-native-ultimate-config

The ultimate config you ever need for your react-native app

Project generated with https://github.com/brodybits/create-react-native-module

TL;DR usage

  1. install
    npmyarn
    npm install react-native-ultimate-configyarn add react-native-ultimate-config
  2. one-off setup for native projects
  3. initialize env
    npmyarn
    npm run rnuc <env file>yarn rnuc <env file>
  4. build! react-native run-{ios,android}

☝❗Approach to versioning and breaking changes

This library is using semver and heavily relying on codegeneration. Many new features and/or bugfixes will require these files to be regenerated. Changes to codegenerated files will not be considered breaking unless they affect behavior of API or CLI.

Therefore every time this library is updated all files MUST be regenerated using rnuc command.

Table of contents

  1. Features 🎆
  2. Mission 🥾
  3. Quickstart Guide 🏃
  4. API 🧰
  5. Changelog 📓
  6. Cookbook 🥦
  7. Alternatives
  8. Dev notes

Features

  1. Simple one-off setup for native projects
  2. No need to mess with xcode schemes or android flavors
  3. Access from javascript
  4. Access from native code: java and objective-c
  5. Access in build tools: xcode, gradle and AndroidManifest.xml
  6. Unit tested with jest
  7. E2E tested with detox
  8. Provides typescript typings
  9. Supports dotenv and yaml
  10. Fully typed values available when using yaml config
  11. Configure values per platform in one file

Mission

React-Native brings together 3 platforms: ios, android, javascript each of which have different conventions and approaches how to manage environment settings.

A typical app is usually operating in some environment defined by server urls various api keys or feature flags. When dealing with react-native such things often need to exist in 3 places: ios, android and js code. Even managing things as simple as application name or bundle id needs to be done in 2 places: Info.plist and AndroidManifest.xml

react-native-ultimate-config tries to reduce friction in managing these things by abstracting away from nuances of native projects.

With react-native-ultimate-config it is possible to consume variables in every place of a typical react-native app:

  • javascript
  • native code
    • java
    • objective-c
  • native build configuration
    • ios
      • build settings
      • infoplist
    • android
      • build config
      • string resources
      • project.ext
|-------------------------------------------------------|
|                                                       |
|                     javascript                        |
|                                                       |
|-------------------------------------------------------|
|                          |                            |
|       objective-c        |           java             |
|                          |                            |
|-------------------------------------------------------|
|                          |                            |
|      build settings      |     AndroidManifest.xml    |
|         infoplist        |        build.gradle        |
|                          |                            |
|-------------------------------------------------------|

Alternatives

projectcomparison
react-native-dotenvJavascript only. Does not allow to configure native counterpart of the app
react-native-configAllows configuring native and javascript

Keywords

FAQs

Package last updated on 23 Jun 2020

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc