1.1.8 • Published 9 years ago

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

Weekly downloads
4
License
ISC
Repository
github
Last release
9 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

9 years ago

1.1.7

10 years ago

1.1.6

10 years ago

1.1.5

10 years ago

1.1.4

10 years ago

1.1.3

10 years ago

1.1.2

10 years ago

1.1.1

10 years ago

1.1.0

10 years ago

1.0.0

10 years ago