Skip to content
Myr

Less is more

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Michel Weststrate · committed by Michel Weststrate · parent 964d38b · Browse files · 1 file+2 added−11 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+2 added−11 removed

  • other:+2 added−11 removed

1 file+2 added−11 removed

modified:readme.md+2 added-11 removed
386 unmodified lines
387const state = {388 hello: "world"389}390391produce(state, (draft) => {392 // no-op393})394// Returns the original state: { hello: "world"}395391produce(state, (draft) => {})392produce(state, (draft) => undefined)397// Returns the original state: { hello: "world"}393// Both return the original state: { hello: "world"}394399produce(state, (draft) => {400 return nothing401})402// Produces a new state, 'undefined'403395produce(state, (draft) => nothing)396// Produces a new state, 'undefined'397```398
281 unmodified lines