From 4ec0e7e4bdc36676a8381d1bf97172d80db0b160 Mon Sep 17 00:00:00 2001 From: Raika Toriyama Date: Sat, 13 Mar 2021 20:29:33 +0900 Subject: [PATCH 1/2] Fix typo --- docs/example-reducer.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/example-reducer.md b/docs/example-reducer.md index b675db55..c046143b 100644 --- a/docs/example-reducer.md +++ b/docs/example-reducer.md @@ -19,7 +19,7 @@ title: Example Reducer Here is a simple example of the difference that Immer could make in practice. ```javascript -// Reducer with inital state +// Reducer with initial state const INITIAL_STATE = {}; // Shortened, based on: https://github.com/reactjs/redux/blob/master/examples/shopping-cart/src/reducers/products.js const byId = (state = INITIAL_STATE, action) => { @@ -43,7 +43,7 @@ After using Immer, our reducer can be expressed as: ```javascript import produce from "immer" -// Reducer with inital state +// Reducer with initial state const INITIAL_STATE = {}; const byId = produce((draft, action) => { From 12a1c671394b6a276934a49e7fe4631198e0d281 Mon Sep 17 00:00:00 2001 From: pvcresin Date: Sat, 13 Mar 2021 20:35:00 +0900 Subject: [PATCH 2/2] Fix typo --- src/types/index.js.flow | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/types/index.js.flow b/src/types/index.js.flow index 1be017a2..4640267e 100644 --- a/src/types/index.js.flow +++ b/src/types/index.js.flow @@ -28,12 +28,12 @@ interface IProduce { recipe: (draftState: S) => S | void, patchListener?: PatchListener ): S; - // curried invocations with inital state + // curried invocations with initial state ( recipe: (draftState: S, a: A, b: B, c: C, ...extraArgs: any[]) => S | void, initialState: S ): (currentState: S | void, a: A, b: B, c: C, ...extraArgs: any[]) => S; - // curried invocations without inital state + // curried invocations without initial state ( recipe: (draftState: S, a: A, b: B, c: C, ...extraArgs: any[]) => S | void ): (currentState: S, a: A, b: B, c: C, ...extraArgs: any[]) => S; @@ -50,12 +50,12 @@ interface IProduceWithPatches { currentState: S, recipe: (draftState: S) => S | void ): [S, Patch[], Patch[]]; - // curried invocations with inital state + // curried invocations with initial state ( recipe: (draftState: S, a: A, b: B, c: C, ...extraArgs: any[]) => S | void, initialState: S ): (currentState: S | void, a: A, b: B, c: C, ...extraArgs: any[]) => [S, Patch[], Patch[]]; - // curried invocations without inital state + // curried invocations without initial state ( recipe: (draftState: S, a: A, b: B, c: C, ...extraArgs: any[]) => S | void ): (currentState: S, a: A, b: B, c: C, ...extraArgs: any[]) => [S, Patch[], Patch[]];