Version: 3.0

Getting Started with Neutron JS

Neutron is a Command Line Interface developed to help developers create new react projects with Redux + Redux Saga, as well as providing a well-structured code organization.

This page will help you install and build your first react project using Neutron JS and it's very important to explain that to work with mobile, you must have installed the expo-cli in your development environment.

Why Expo for React Native?

We chose Expo due to maturity that it's reached and because it's not necessary to configure and install SDKs, emulators and other common requirements for iOS and Android development.

To learn more about expo-cli, check: Get Started With Expo.

Installation

This is simple and easy because Neutron JS is available as a package in Node Package Manager. You should write your terminal:

yarn global add @neutronjs/cli

After installation, you can confirm using neutron on your terminal or neutron -h to check all available commands:

Starts With:
neutron create Create new project with React
Commands:
neutron add:component Add new component files
neutron add:duck Add new duck file
neutron add:page Add new page files
neutron add:saga Add new saga and duck files
Utils:
neutron -h Show help information
neutron -v Output the version number

Creating a new project

To create a new project, you must use command with this format:

neutron create <appName> <technology>

Available technologies:

  • --react: create a new project with React JS
  • --react-native: create a new project with React Native

Usage example:

neutron create my-app --react

After a while you will see the success message and be able to start the application with a development server using:

cd my-app && yarn start || npm run start