Coder Social home page Coder Social logo

dx-react's Introduction

Welcome to dx-react!

Generate react things with just a command.

For beginnings, lets install the npm package.

npm i -g dx-react

Give sudo permissions if you are on Linux/MacOS

Component

Generate a new component from your terminal

dx-react component YOUR_NAME

This creates a folder with the given name and adds index.js file and YOUR_NAME.css file.

dx-react file YOUR_NAME

This just creates YOUR_NAME.js file in your components file.

Screen shot of to be generated code

Rules :

  • Only Alphabets are allowed for a name

  • No Number, Special character, spaces are allowed for a name

  • A Component folder is created if not exists and all the generated files are stored here.

  • The given name is converted to lowercase to process

Router

Generate a router file

dx-react router

No name required. This command will generate router.js file in your src folder. enter image description here

Rules

  • Import components to your router.js file

  • Navbar template is added. Add links as you need

  • Routes template is added. Uncomment and declare routes

  • Once done, change the below code in your index.js file.

import Router from './router';

ReactDOM.render(<Router />, document.getElementById('root'));

Form

Generate a form template with validations, onchange events and submit function

dx-react form YOUR_NAME

This components folder with YOUR_NAME folder and index.js and YOUR_NAME.css

dx-react form YOUR_NAME

This creates just a file with YOUR_NAME.js in your components folder

All component rules apply here.

dx-react's People

Contributors

himakargalipuri avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.