Skip to content

Docs: Remove references to wrapped reducer function #3192

@brandonroberts

Description

@brandonroberts

Other information:

In the docs we have reducers wrapped in an exported function

const _counterReducer = createReducer(
  initialState,
  on(increment, (state) => state + 1),
  on(decrement, (state) => state - 1),
  on(reset, (state) => 0)
);
 
export function counterReducer(state, action) {
  return _counterReducer(state, action);
}

This is not required with Ivy, which is the default now. Change these reducers to be directly exported

export const counterReducer = createReducer(
  initialState,
  on(increment, (state) => state + 1),
  on(decrement, (state) => state - 1),
  on(reset, (state) => 0)
);

I would be willing to submit a PR for the docs ❤️

[ ] Yes (Assistance is provided if you need help submitting a pull request)
[ ] No

Metadata

Metadata

Assignees

Labels

Accepting PRsGood First IssueGood issue for first-time contributorcommunity watchSomeone from the community is working this issue/PR

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions