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-simple-nav

v1.1.0

Published

react-native simple navigator, just wanted to see if I could...I was bored

Downloads

2

Readme

I was bored and made a React-Navite Navigator....

  • It's straight up JavaScript using the React-Native Animated API

  • No Gestures...

  • It works as described below, It's working for me in production... 🤓 🤓 .... the stock Navigators are probably better because those BookFace Engineers are smart, but this allowed me to do something different and I have some unique scene changes.

  • has zoomIn spinIn zoomSpin fadeIn fromLeft fromRight fromBottom fromTop as scene transitions.

rn-simple-nav

npm install --save rn-simple-nav

  • Access the navigator as such

import { SimpleNav } from rn-simple-nav

| Prop | Type | Description | Required | | --- | --- | --- | ---- | | screens | array of screen objects see below for structure| the screen for the navigator to render | YES| | header | renderable component | the optional top header to persist | no | | footer | renderable component | optional footer to persist | no | | onFocus | function | function called when a screen is focused, called with screen name | no| |onBlur | function | function called when a screen's focus is removed, called with screen name | no |

Screen object
  • must have a name and a screen
  • name is a string
  • screen is a renderable component
  • must supply at least one to start this sucker up.
{name:'ScreenOne', screen: <ScreenOne />}
Methods
  • What good is a Navigator if you can't navigate on it...
  • Access methods as such
you may notice there is no pop method, rather than "popping" a screen, just use the push function, specify the direction, and speed that sucker up.

import { Transitions } from 'rn-simple-nav'

| method | description |arguments | example(s) | | --- | --- | --- | --- | | pushScreen | pushes a new screen to the top of the navigator. If the Navigator already has the screen available you can call it by name. If the navigator has no reference, you must supply it with the screen object | (direction required,screen required ,duration optional) direction can be one of fromRight fromLeft fromTop fromBottom spinIn fadeIn zoomIn zoomSpin screen can be just a string if the Navigator has it in the stack, or a screen object duration is in milliseconds and the default is 250 | Transitions.pushScreen('fromRight',{name:'ScreenTwo',screen:<ScreenTwo />}) Transitions.pushScreen('fromLeft','ScreenOne',50)| | removeScreen | removes the screen from the stack | screen name | Transitions.removeScreen('ScreenOne')| | removeAllBut | removes all screens but the one passed in | screen name | Transitions.removeAllBut('ScreenOne') | | getScreens | return a list of screens the Navigator has | none | Transitions.getScreens() | | toggleHeader | toggles the display of the header | none | Transitions.toggleHeader() | |toggleFooter | toggles the display of the footer | none | Transitions.toggleFooter()|

Full example in the example folder

Example