localdata01
localdata01

Reputation: 657

is redux toolkit slower than normal redux reducers?

I have seen this post

What is difference between Redux and Redux toolkit? The Redux Toolkit generates the new state from the direct changes to the old state. ... The reducers that are written with immer are 2 to 3 times slower than a normal Redux reducer. Here is an example of a Reducer function that uses the state as immutable and one which makes changes directly to the state.3 Feb 2020

is that true?

Upvotes: 0

Views: 2030

Answers (1)

markerikson
markerikson

Reputation: 67469

Immer documents its expected performance behavior here:

https://immerjs.github.io/immer/performance/

In practice, the perf differences are not generally meaningful. Reducers are almost never the perf bottleneck in a typical React+Redux app. The cost of updating the UI is significantly greater.

Upvotes: 2

Related Questions