davidhu2000 / react_redux_generator Goto Github PK
View Code? Open in Web Editor NEWA npm script for generating all parts of react and redux web application.
Home Page: https://www.npmjs.com/package/redux-file-gen
License: MIT License
A npm script for generating all parts of react and redux web application.
Home Page: https://www.npmjs.com/package/redux-file-gen
License: MIT License
it is import sessionReducer from './session_reducer.js;'
,
need to move the semicolon to after the quote.
when removing util file, the module tries to remove from /frontend/utils/*.js
instead of from /frontend/util/*.js
When generating a reducer with camel case name, the converter does not convert to snack case.
redux g reducer tvShows
will create a reducer with the name
tvShows_reducer.js
Whenever a component is generated,
<component>.jsx
and <component>_container.jsx
are generated. If we change the container filename to index.jsx
, then whenever we import the component, we can just do
`import Component from './component'
instead of
import ComponentContainer from './component/component_container'
currently is import thunk from 'react-redux'
need to change to import thunk from 'redux-thunk'
When create an action file using compound name, like sessionApi
,
the file name should be session_api_actions.js
, instead, the generator creates sessionApi_actions.js
need to add
import Root from './components/root';
to the entry file.
otherwise get an error for Root is not defined.
props
in the following should be state
instead. Maybe you can even have (state, ownProps)
.const mapStateToProps = props => ({
});
export default
inexport connect(
mapStateToProps,
mapDispatchToProps
)(Component);
when creating an util with an ajax request, the result is
export const fetchVideos = videos => ({
$.ajax({
method: '',
url: '',
data: ''
})
});
it should be
export const fetchVideos = videos => (
$.ajax({
method: '',
url: '',
data: ''
})
);
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.