1.1.8 • Published 8 years ago

react-redux-cli-file-structure v1.1.8

Weekly downloads
4
License
ISC
Repository
github
Last release
8 years ago

REACT REDUX CLI FILE STRUCTURE

How to start

Installation:

npm install -g react-redux-cli-file-structure

if permission denied 

sudo npm install -g react-redux-cli-file-structure

Usage:

On you command line type without $

$v -d ~/directory_destination ModueNameShouldStudly

OR 

$v --dirdest ~/directory_destination ModueNameShouldStudly

Result:

directory_destination
	-moduenameshouldstudly
		-actions
			->index.js
		-components
		-containers
			->ModueNameShouldStudly.js
		-reducers
			->index.js
		->routes.js
		->constants.js

ModueNameShouldStudly.js:

import React, { Component } from 'react';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import * as actions from '../actions';

class ModueNameShouldStudly extends Component {

    state = {}

    render(){

                return (
                        <div></div>
                )
        }
}

export default connect(
        state => {
                const moduenameshouldstudly = state.moduenameshouldstudly

                return {
            moduenameshouldstudly
                }
        },
        dispatch => {
                return {
                        action: bindActionCreators(actions,  dispatch)
                }
        }
)(ModueNameShouldStudly)

reducers.js

import * as c from './constants';

const initState = {}

export const moduenameshouldstudly = (state = initState, action) => {
        return state;
}
1.1.8

8 years ago

1.1.7

8 years ago

1.1.6

8 years ago

1.1.5

8 years ago

1.1.4

8 years ago

1.1.3

8 years ago

1.1.2

8 years ago

1.1.1

8 years ago

1.1.0

8 years ago

1.0.0

8 years ago