{"ScriptPreparationCode":"function getItems(count) {\r\n let id = 1;\r\n return _.times(count, () =\u003E ({\r\n name: \u0022city\u0022 \u002B id\u002B\u002B,\r\n visited: true\r\n }))\r\n}\r\n\r\n\r\ndata = getItems(1000).reduce((acc, curr) =\u003E ({ ...acc, [curr.name]: curr.visited }), {})\r\naction = { name: \u0027city1\u0027, visited: true };","TestCases":[{"Name":"immer","Code":"const reducer = (state, curr) =\u003E { return immer.produce(state, draft =\u003E { draft[curr.name] = curr.visited }) };\r\nreducer(data, action)","IsDeferred":false},{"Name":"Mutate","Code":"const reducer = (draft, curr) =\u003E { draft[curr.name] = curr.visited; return draft; };\r\nreducer(data, action)","IsDeferred":false},{"Name":"Spread","Code":"const reducer = (draft, curr) =\u003E ({ ...draft, [curr.name]: curr.visited });\r\nreducer(data, action)","IsDeferred":false},{"Name":"immer pull up","Code":"const reducer = immer.produce((draft, curr) =\u003E { draft[curr.name] = curr.visited; });\r\nreducer(data, action)","IsDeferred":false}]}