added comments about compose function
This commit is contained in:
1 parent
339e1caf16
commit
f8971ca13e
3 files changed
+15
-1
No files matched your search
@@ -124,6 +124,9 @@ const ConnectedGUI = connect(
|
||||
mapDispatchToProps,
|
||||
)(GUI);
|
||||
|
||||
// note that redux's 'compose' function is just being used as a general utility to make
|
||||
// the hierarchy of HOC constructor calls clearer here; it has nothing to do with redux's
|
||||
// ability to compose reducers.
|
||||
const WrappedGui = compose(
|
||||
ErrorBoundaryHOC('Top Level App'),
|
||||
ProjectFetcherHOC,
|
||||
|
||||
@@ -50,7 +50,14 @@ const mapDispatchToProps = dispatch => ({
|
||||
onSeeInside: () => dispatch(setPlayer(false))
|
||||
});
|
||||
|
||||
const ConnectedPlayer = connect(mapStateToProps, mapDispatchToProps)(Player);
|
||||
const ConnectedPlayer = connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps
|
||||
)(Player);
|
||||
|
||||
// note that redux's 'compose' function is just being used as a general utility to make
|
||||
// the hierarchy of HOC constructor calls clearer here; it has nothing to do with redux's
|
||||
// ability to compose reducers.
|
||||
const WrappedPlayer = compose(
|
||||
HashParserHOC,
|
||||
AppStateHOC,
|
||||
|
||||
@@ -15,6 +15,10 @@ import ProjectMetaDataHOC from '../lib/project-metadata-hoc.jsx';
|
||||
*/
|
||||
export default appTarget => {
|
||||
GUI.setAppElement(appTarget);
|
||||
|
||||
// note that redux's 'compose' function is just being used as a general utility to make
|
||||
// the hierarchy of HOC constructor calls clearer here; it has nothing to do with redux's
|
||||
// ability to compose reducers.
|
||||
const WrappedGui = compose(
|
||||
AppStateHOC,
|
||||
HashParserHOC, // NOTE: IMPORTANT: ok that i've reordered this?
|
||||
|
||||
Reference in new issue
Block a user