Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implement combineReducers #9

Merged
merged 3 commits into from
Mar 3, 2018

Conversation

AmaranthineCodices
Copy link
Contributor

This fixes #6. It adds a combineReducers function that works pretty much as expected:

combineReducers({
    a = function(state, action)
        -- state here is rootState.a
    end,
    b = function(state, action)
        -- state here is rootState.b
    end,
})

@coveralls
Copy link

coveralls commented Mar 3, 2018

Coverage Status

Coverage increased (+0.08%) to 98.947% when pulling 745de3a on AmaranthineCodices:combineReducers into 676e5d3 on Roblox:master.

Copy link
Contributor

@LPGhatguy LPGhatguy left a comment

Choose a reason for hiding this comment

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

Awesome PR! Minor test request.

end,
b = function(state, action)
bCount = bCount + 1
end,
Copy link
Contributor

Choose a reason for hiding this comment

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

For pedantry's sake, can we actually return a new state value for each of these to test that values are assigned to the correct key? Something simple, like making a return state + 1 and b returning state + 2 would do.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should be good now; I added a separate test for this.

@LPGhatguy
Copy link
Contributor

Thanks, as always!

@LPGhatguy LPGhatguy merged commit 9efe558 into Roblox:master Mar 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement combineReducers
3 participants