Skip to content
This repository has been archived by the owner on Jan 27, 2021. It is now read-only.

dynamic-counters example #11

Merged
merged 3 commits into from
Jun 21, 2018
Merged

Conversation

MillerGregor
Copy link
Contributor

Q A
Fixed Issues? example for discussion of #10
Documentation only PR yes
Patch: Bug Fix?
Minor: New Feature?
Major: Breaking Change?
Tests Added + Pass?

Adds another example, based on redux-saga/cancellable-counters.

This example demonstrates a dynamic list of dynostore dynamic components.


const initialState = { counterIds: ['Counter one', 'Counter two'] }

export const pageReducer = (state = initialState, action) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move to the reducers folder?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also not sure on the page name. counters?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moved into reducers/index.js
un-defaulted previous reducer and renamed to counterInstanceReducer
renamed state slice from page to counters
renamed id array value from counterIds to allIds

}
}

class DynaCounter extends React.Component {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move to the compnents folder. Could add a link to it directly in the README.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moved and linked

@mpeyper
Copy link
Contributor

mpeyper commented Jun 21, 2018

Great work!

Don't forget to add yourself as a contributor using the "Examples" option.

@mpeyper mpeyper merged commit b31f181 into ioof-holdings:master Jun 21, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants