Skip to content

Conversation

@markerikson
Copy link
Collaborator

@markerikson markerikson commented Nov 3, 2025

This PR:

  • Updates our Immer dep to Immer 10.2, which contains the first small perf tweaks I've worked on for Immer
  • Specifically sets the new strictIteration option to false (ie assume no symbol keys in state updates for faster iteration). Based on my benchmarks, this provides a ~10% speedup. That call is done in the createReducer file, so it always applies (except the highly unlikely case someone isn't writing any reducers / not using RTKQ)

It's technically possible that there might be Redux users relying on symbols as keys in state, but in practice this is not how we intend Redux to be used, and therefore this is not considered a breaking change. If by chance this affects someone, there's an easy fix - import and call setUseStrictIteration(true) in your own app code.

Given that this should be a free 10% perf win for all RTK users, it's an easy choice to turn this on.

@codesandbox
Copy link

codesandbox bot commented Nov 3, 2025

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

@codesandbox-ci
Copy link

codesandbox-ci bot commented Nov 3, 2025

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit d8a894a:

Sandbox Source
@examples-query-react/basic Configuration
@examples-query-react/advanced Configuration
@examples-action-listener/counter Configuration
rtk-esm-cra Configuration

@github-actions
Copy link

github-actions bot commented Nov 3, 2025

size-limit report 📦

Path Size
1. entry point: @reduxjs/toolkit (modern.mjs) 2.89 KB (+2123.31% 🔺)
1. entry point: @reduxjs/toolkit/query (modern.mjs) 3.83 KB (+4.09% 🔺)
1. entry point: @reduxjs/toolkit/query/react (modern.mjs) 15.35 KB (+0.87% 🔺)
2. entry point: @reduxjs/toolkit (without dependencies) (modern.mjs) 165 B (+22.23% 🔺)
1. entry point: @reduxjs/toolkit (cjs, production.min.cjs) 14.52 KB (+0.91% 🔺)
1. entry point: @reduxjs/toolkit/react (cjs, production.min.cjs) 14.67 KB (+1.16% 🔺)
1. entry point: @reduxjs/toolkit/query (cjs, production.min.cjs) 24.69 KB (+0.93% 🔺)
1. entry point: @reduxjs/toolkit/query/react (cjs, production.min.cjs) 27.02 KB (+0.74% 🔺)
2. entry point: @reduxjs/toolkit (without dependencies) (cjs, production.min.cjs) 7.74 KB (+0.21% 🔺)
3. createSlice (.modern.mjs) 4.4 KB (+3.16% 🔺)
3. createAsyncThunk (.modern.mjs) 4 KB (+191.4% 🔺)
3. buildCreateSlice and asyncThunkCreator (.modern.mjs) 5.28 KB (+2.74% 🔺)
3. createEntityAdapter (.modern.mjs) 5.08 KB (+2.57% 🔺)
3. configureStore (.modern.mjs) 4.34 KB (+145.45% 🔺)
3. combineSlices (.modern.mjs) 3.65 KB (+246.49% 🔺)
3. createDynamicMiddleware (.modern.mjs) 3.49 KB (+325.39% 🔺)
3. createDynamicMiddleware (react) (.modern.mjs) 3.58 KB (+286.5% 🔺)
3. createListenerMiddleware (.modern.mjs) 4.61 KB (+126.68% 🔺)
3. createApi (.modern.mjs) 15.78 KB (+0.97% 🔺)
3. createApi (react) (.modern.mjs) 17.83 KB (+1.17% 🔺)
3. fetchBaseQuery (.modern.mjs) 4.84 KB (+3.12% 🔺)

@netlify
Copy link

netlify bot commented Nov 3, 2025

Deploy Preview for redux-starter-kit-docs ready!

Name Link
🔨 Latest commit d8a894a
🔍 Latest deploy log https://app.netlify.com/projects/redux-starter-kit-docs/deploys/6907f45e5e21840008a62c04
😎 Deploy Preview https://deploy-preview-5127--redux-starter-kit-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@markerikson markerikson merged commit df24e25 into master Nov 3, 2025
120 checks passed
@aryaemami59 aryaemami59 deleted the feature/immer-10.2 branch November 3, 2025 06:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants