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

CPLAT-9092 Add built_redux to Redux Docs #452

Merged
merged 13 commits into from
Jan 29, 2020

Conversation

joebingham-wk
Copy link
Contributor

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

  • Add a built_redux_to_redux markdown doc

Release Notes

  • Add a built_redux to OverReact Redux transition guide.

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

  • Tests were updated and provide good coverage of the changeset and other affected code
  • Manual testing was performed if needed

Merge Checklist

While we perform many automated checks before auto-merging, some manual checks are needed:

  • A Client Platform member has reviewed these changes
  • There are no unaddressed comments - this check can be automated if reviewers use the "Request Changes" feature
  • For release PRs - Version metadata in Rosie comment is correct

@joebingham-wk joebingham-wk changed the title Add built_redux to Redux Docs CPLAT-9092 Add built_redux to Redux Docs Jan 17, 2020
@aviary-wf
Copy link

Security Insights

No security relevant content was detected by automated scans.

Action Items

  • Review PR for security impact; comment "security review required" if needed or unsure
  • Verify aviary.yaml coverage of security relevant code

Questions or Comments? Reach out on Slack: #support-infosec.

Comment on lines 51 to 66
// 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),
]);
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

@aaronlademann-wf aaronlademann-wf left a 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

Copy link

@rmconsole-wf rmconsole-wf left a comment

Choose a reason for hiding this comment

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

+1 from RM

@rmconsole7-wk rmconsole7-wk merged commit fb577cd into master Jan 29, 2020
@rmconsole7-wk rmconsole7-wk deleted the CPLAT-9092-builtRedux-to-Redux branch January 29, 2020 20:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants