npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

rn-gnavigator

v1.0.17

Published

Simple stack navigator

Downloads

12

Readme

rn-gnavigator

install cmd:

 npm install rn-gnavigator

Props:

| Props | Type | default | Discription | |--|--|--|--| | initialScreen | React Component | | set the initial Screen to the Stack | | initialParam | Any | emty string | it sets the initial param | | initialScreenBackHandler | function | exitApp() | called when we click backbutton on initial screen | | transitionDirection | horizontal, vertical, normal | horizontal | it desides the transiton direction | | transitionDuration | number in ms | 200 | it desides the transition duration | | transition | none, fade | none | to add fading animations | | type | normal, auth | normal | making login type screens or normal stack | | loginScreen | React Component | | here give Login Screen Component | | homeScreen | React Component | | here you can give home or dashboard component | | loginParam | any | emty string | initial param for login ie. Home Screen | | logoutParam | any | emty string | initial param for logut ie. Login Screen |

Methods:

There are two components are here

// Here you can push screen
this.props.push({ Screen: Screen, param: data }); // Here the screen is the React Component
// Here you can pop screen
this.props.pop();
// Here you can restart with initial screen
this.props.restart();
// Here you can restart with Home or Dashboard screen
this.props.login();
// Here you can restart with Login screen
this.props.logout();
// Here you can manage common state of Stack
this.props.setState({ some: 'some' }); // Here same like setState method

this methods are send to all the screens via props

Data:

this.props.pushedData // has the sended data to this 2nd screen
this.props.state // common state for all the screen

this will get the data send from previous screen with push() method.

Usage:

import React from 'react';
import { View, Text } from 'react-native';
import { Stack } from 'rn-gnavigator';

class Test extends React.Component {
    render() {
	    return <View style={{
		    flex: 1,
		    backgroundColor: 'red',
		    alignItems: 'center',
		    justifyContent: 'center'
		}}>
			<Text onPress={() => this.props.push(TestPage)}>
				Go to Test Page
			</Text>
		</View>;
    }
}

class TestPage extends React.Component {
    render() {
	    return <View style={{
		    flex: 1,
		    backgroundColor: 'blue',
		    alignItems: 'center',
		    justifyContent: 'center'
		}}>
			<Text onPress={() => this.props.pop()}>
				Go back to Test
			</Text>
		</View>;
    }
}

export default App extends React.Component {
    render() {
	    return <Stack initialScreen={Test} />;
    }
}

TekNik GG

This is a YouTube Channel for react-native exclusively Please Support Our Channel and Click here to SUBSCRIBE

website

Learn Somthing...

Happy Coding...

: )