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-create

v1.0.5

Published

react-native cli to create react-native boilerplate component, stateless component, screens, react-navigation boiler plate , integrate redux in component, integrate redux-saga for api call just by using cli.

Downloads

9

Readme

rn-create

react-native cli to create react-native boilerplate component, stateless component, screens, react-navigation boiler plate , integrate redux in component, integrate redux-saga for api call just by using cli.

installation

npm i -g rn-create

usage

You have to be in react native project directory to run these commands.

To create component

rn-create -g component CoolComponent

To create stateless component

rn-create -g component CoolComponent --stateless

To create screen

rn-create -g screen CoolScreen

To create stateless screen

rn-create -g screen CoolScreen --stateless

To integrate react-navigation library in your project.

rn-create -g navigation

To generate stack navigation boilerplate.

rn-create -g navigation --type="stack" CoolStackNavigator

To generate drawer navigation boilerplate.

rn-create -g navigation --type="drawer" CoolDrawerNavigator

To generate bottom-tabs navigation boilerplate.

rn-create -g navigation --type="bottomTabs" CoolBottomTabsNavigator

To generate material-bottom-tabs navigation boilerplate.

rn-create -g navigation --type="materialBottomTabs" CoolMaterialBottomTabsNavigator

To generate material-top-tabs navigation boilerplate.

rn-create -g navigation --type="materialTopTabs" CoolMaterialTopTabsNavigator

To generate navigation component with redux append --redux with the command

To integrate redux in your app

rn-create -g redux

To integrate redux in your component boilerplate

rn-create -g screen CoolScreen --stateless --redux

rn-create -g screen CoolScreen --redux

rn-create -g component CoolScreen --stateless --redux

rn-create -g component CoolScreen --redux

To add redux action for app

rn-create -g redux-action CoolAction

To add redux reducer for app

rn-create -g redux-reducer CoolReducer

To add redux reducer and action both for app

rn-create -g redux-action-reducer FooReducer

To integrate api call in your app follow these examples and need to set base url only once.

#GET https://example.com/api/users

rn-create -g api users --base-url https://example.com/api/user

#POST https://example.com/api/users

rn-create -g api users --post

#PUT https://example.com/api/users

rn-create -g api users --put

#DELETE https://example.com/api/users

rn-create -g api users --delete

Above commands will create neccessary files and folder in src/api folder.

To add saga to handle this created api , you can integrate using just by specifying some params like --saga --watch --resolve

For example #GET https://example.com/api/users

rn-create -g api users --base-url https://example.com/api/user --saga --watch="FETCH_USERS" --resolve="LIST_USERS"

By this command, in your have api endpoints created as usual just like above command but in addition you have one saga created in src/redux/sagaList/{User}.js. This saga will take every action given in watch i.e. FETCH_USERS params and call api to fetch user and after calling api result will be saved by dispatching action given in resolve i.e LIST_USERS