rnl

react-native-localhost

⚛️ 🏡 Returns the local address of your actual development machine.

Showing:

Popularity

Downloads/wk

80

GitHub Stars

19

Maintenance

Last Commit

7mos ago

Contributors

2

Package

Dependencies

2

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

react-native-localhost

⚛️ 🏡 Returns the local address of your actual development machine.

🚀 Getting Started

Using Yarn:

yarn add react-native-localhost

✍️ Usage

Okay, so this is really simple.

Basically, whenever you run npm i or yarn, a postinstall hook for this package is triggered, which determines your machine's local ip address and writes it to the module's default export:

import * as React from 'react';
import { Text } from 'react-native';
import localhost from 'react-native-localhost';

export default function App(): JSX.Element {
  return <Text>{`Development machine is running on: ${localhost}`}</Text>;
}

That's it. Nothing magical, and certainly nothing fit for use in production.

✌️ License

MIT

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100