-
Notifications
You must be signed in to change notification settings - Fork 58
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
CPLAT-9092 Add built_redux to Redux Docs #452
Conversation
Security InsightsNo security relevant content was detected by automated scans. Action Items
Questions or Comments? Reach out on Slack: #support-infosec. |
doc/built_redux_to_redux.md
Outdated
// Using `combineReducers` | ||
final incrementReducer = (ReduxState prevState, IncrementAction action) => | ||
ReduxState.from(count: prevState.count + action.incrementBy); | ||
final decrementReducer = (ReduxState prevState, DecrementAction action) => | ||
ReduxState.from(count: prevState.count - action.decrementBy); | ||
final customActionReducer = (ReduxState prevState, CustomAction action) => | ||
ReduxState.from(customActionValue: action.customActionValue, secondCustomActionValue: action.seconCusomActionValue); | ||
final simpleActionReducer = (ReduxState prevState, SimpleAction action) => | ||
ReduxState.from(simpleActionState: !prevState.simpleActionState); | ||
|
||
Reducer<ReduxState> countReducer = combineReducers([ | ||
TypedReducer<ReduxState, IncremementAction>(incrementReducer), | ||
TypedReducer<ReduxState, DecrementAction>(decrementReducer), | ||
TypedReducer<ReduxState, CustomAction>(customActionReducer), | ||
TypedReducer<ReduxState, SimpleAction>(simpleActionReducer), | ||
]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason we're using more reducers than the built_redux example has? Shouldn't we just do increment
/ decrement
for parity?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, good catch. The reason they were all there was that combineReducers
used to be part of the the Reducer section below, but then I moved it into its own section and just grabbed the ReducerBuilder
example. So no real reason.
Co-Authored-By: Aaron Lademann <[email protected]>
…2-builtRedux-to-Redux
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
@Workiva/release-management-pp
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 from RM
Motivation
To aid in the transition to Redux, we want to add a doc that outlines the differences between built_redux and Redux, along with tips on how to transition.
Changes
Release Notes
Review
See CONTRIBUTING.md for more details on review types (+1 / QA +1 / +10) and code review process.
Please review:
@aaronlademann-wf @greglittlefield-wf @willdrach-wk @sydneyjodon-wk
QA Checklist
Merge Checklist
While we perform many automated checks before auto-merging, some manual checks are needed: