# react-native-pure-splash-screen

> react native splash screen

Latest version **0.0.6** (published 2020-04-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-native-pure-splash-screen
pnpm add react-native-pure-splash-screen
yarn add react-native-pure-splash-screen
bun add react-native-pure-splash-screen
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.6 |
| Published | 2020-04-07 |
| First published | 2019-06-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 20.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | musicode |
| Maintainers | musicode |
| Keywords | react, native, splash screen |

## Links

- npm: https://www.npmjs.com/package/react-native-pure-splash-screen
- Repository: https://github.com/musicode/react-native-pure-splash-screen
- Homepage: https://github.com/musicode/react-native-pure-splash-screen#readme
- Issues: https://github.com/musicode/react-native-pure-splash-screen/issues
- npm.io page: https://npm.io/package/react-native-pure-splash-screen

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 0.0.6 (latest) — 2020-04-07
- 0.0.5 — 2019-11-07
- 0.0.4 — 2019-11-05
- 0.0.3 — 2019-11-05
- 0.0.2 — 2019-10-28
- 0.0.1 — 2019-06-22

## README

# react-native-pure-splash-screen

This is a module which help you display a splash screen to avoid blank screen.

## Installation

```
npm i react-native-pure-splash-screen
// link below 0.60
react-native link react-native-pure-splash-screen
```

## Setup

### iOS

Modify `AppDelegate.m`

```oc
#import <RNTSplashScreenModule.h>

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
  ...
  // add this line
  [RNTSplashScreenModule show:rootView];
  return YES;
}
```

### Android

Step1

add a layout file named `splash_screen_default.xml` under your `res/layout` directories.

Step2

Modify `MainActivity.java`

```java
package com.example;

import android.os.Bundle;

import com.facebook.react.ReactActivity;
import com.github.musicode.splashscreen.RNTSplashScreenModule;

public class MainActivity extends ReactActivity {

    /**
     * Returns the name of the main component registered from JavaScript.
     * This is used to schedule rendering of the component.
     */
    @Override
    protected String getMainComponentName() {
        return "example";
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        // add this line
        RNTSplashScreenModule.Companion.show(this);
        super.onCreate(savedInstanceState);
    }

}
```

## Usage

```js
import SplashScreen from 'react-native-pure-splash-screen'

SplashScreen.hide()
```

---
_Source: https://npm.io/package/react-native-pure-splash-screen · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
