react-redux-boilerplate
react-redux-boilerplate copied to clipboard
Is there an even more simplified boilerplate without that confusing `reselect` stuff?
Hi,
so far I'm loving this boilerplate. But in my oppinion for a "minimal boilerplate" there is still too much confusing stuff in it.
For example all these imports from reselect and the injection of reducers and sagas.
Is there another fork of this without the whole reselect part?
Just React + Redux + Saga with all the up to date developing features (like hot module replacement + persisting state while hot reloading, etc.).
It's now day 3 with this boilerplate and I'm still confused about a few parts.
For example look in the folder app/containers/HomePage/index.js
Wouldn't it be much simpler for beginners using this boilerplate to just do the export like this:
import { connect } from 'react-redux';
import HomePage from './HomePage';
import { loadRepos } from '../App/actions';
import { changeUsername } from './actions';
const mapDispatchToProps = (dispatch) => ({
onChangeUsername: (evt) => dispatch(changeUsername(evt.target.value)),
onSubmitForm: (evt) => {
if (evt !== undefined && evt.preventDefault) evt.preventDefault();
dispatch(loadRepos());
}
});
const mapStateToProps = createStructuredSelector({
repos: makeSelectRepos(),
username: makeSelectUsername(),
loading: makeSelectLoading(),
error: makeSelectError()
});
export default connect(mapStateToProps, mapDispatchToPops)(HomePage)
Right now I'm really struggling with it. All the other features it gives you are very much appreciated and very nice! Also I found out that the package react-router-redux
has been deprecated and now lives under another package called connected-react-router
. Not that it bothers me, just because I figured it while going through all the packages it uses :)
What is your oppinion on that? I'm asking because the project literally says:
A minimal, beginner friendly React-Redux boilerplate with all the industry best practices
But for me right now it's:
A React-Redux boilerplate with all the industry best practices
What do you guys think?