Skip to content
This repository has been archived by the owner on Mar 22, 2020. It is now read-only.

Is there an even more simplified boilerplate without that confusing reselect stuff? #36

Open
SelfDevTV opened this issue Jun 6, 2019 · 0 comments

Comments

@SelfDevTV
Copy link

SelfDevTV commented Jun 6, 2019

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?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant