Socket
Book a DemoInstallSign in
Socket

rctr

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rctr

React CLI

latest
Source
npmnpm
Version
1.0.5
Version published
Maintainers
1
Created
Source

rx

CLI for React projects built with Parcel.

Install

npm i -g rctr

Commands

Below are the avilable commands you can run with the rx cli.

new

rx new my-app

rx new scaffolds a new app with support for SSR, lazyloading, i18n, SCSS, and more. We chose the kitchen sink approach.

For an example of what gets scaffolded, see react-starter.

generate

rx generate scaffolds code snippets in the directory the command is run.

Here is a list of arguments the rx generate command will take.

typefile
fn-component, fcpure function component
arrow-fn-component, afcarrow function component
component, cclass component
view, vclass component with imported styles, test
ssrserver-side rendered view
test, tspec file
state, sstate with reducer
context , ctxcontext

Example

rx generate view Map

  • Map.tsx created
  • Map.spec.tsx created
  • Map.scss created

Some generators support optional arguments --routing and --lazy.

rx g ssr About --routing --lazy

  • About.tsx created
  • About.spec.tsx created
  • About.scss created
  • App.tsx has new routes

The first argument --routing adds a route to the nearest implementation of React Router.

<Route exact={true} path="/about" render={() => <About />} />

The second argument --lazy optionally lazyloads the component.

const About = importComponent(() => import("./view/about/About"));

Development

If you want to contribute fork this repo, make your changes and submit a pull request.

To get started with development run yarn install and yarn link.

FAQs

Package last updated on 10 Feb 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts