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

react-cli-snippets

v1.2.4

Published

React CLI snippets for creating TypeScript Functional Components, Class Components, Services, Models, Utils and more.

Downloads

24

Readme

react-cli-snippets

CLI Commands for creating the following React entities using TypeScript syntax:

  • Functional Component
  • Class Component
  • Utility class
  • Model class
  • Service class

Installation:

npm i -g react-cli-snippets

CLI Commands:

create fc Kitten creates a Functional Component. create fc Kitten --scss creates a Functional Component using SCSS. create fc Kitten --module creates a Functional Component using CSS-Module. create fc Kitten --props creates a Functional Component with Props. create fc Kitten --scss --props creates a Functional Component with Props, using SCSS. create fc Kitten --module --props creates a Functional Component with Props, using CSS-Module. create cc Kitten creates a Class Component. create cc Kitten --props creates a Class Component with Props. create cc Kitten --state creates a Class Component with State. create cc Kitten --props --state creates a Class Component with Props and State. create util KittenUtil creates a Util Class. create model KittenModel creates a Model Class. create service KittenService creates a Service Class. create --help displays this help page. create --version displays version.

Directories & Files:

Each component contains a .tsx and .css or .scss or .module.css file. The components are created by default inside ./src/Components folder. To create a component directly inside ./src folder instead, prefix it with a forward slash. The utils are created by default inside ./src/Utils folder. To create a util directly inside ./src folder instead, prefix it with a forward slash. The models are created by default inside ./src/Models folder. To create a model directly inside ./src folder instead, prefix it with a forward slash. The services are created by default inside ./src/Services folder. To create a service directly inside ./src folder instead, prefix it with a forward slash. Examples: create fc Kitten creates the component in ./src/Components/Kitten folder. create fc /Kitten creates the component in ./src/Kitten folder. create util KittenUtil creates the util in ./src/Services folder. create util /KittenUtil creates the util in ./src folder. create model KittenModel creates the model in ./src/Models folder. create model /KittenModel creates the model in ./src folder. create service KittenService creates the service in ./src/Services folder. create service /KittenService creates the service in ./src folder.

Happy Components Creation 😎