Replies: 1 comment
-
| Yes, it does get evaluated after every action. However, it shouldn't be a perf bottleneck. Predicates are supposed to be trivial checks that immediately return a boolean. That's even less work than all the selectors that will run after every action. Now, yes, those are more function calls, so there is an  | 
Beta Was this translation helpful? Give feedback.
                  
                    0 replies
                  
                
            
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
-
Hi Redux Team,
I have a question regarding the
createListenerMiddlewarein Redux Toolkit. Specifically, I want to know how thepredicatefunction behaves in terms of performance.My Question:
predicatefunction get evaluated after every action is dispatched, regardless of the action type or target?predicatecontains more complex logic (e.g., state comparisons or function calls)?createListenerMiddlewarewhen usingpredicate?I’m concerned about whether using
predicatein a heavily action-driven environment could degrade performance, and I’d appreciate any insights or suggestions to avoid potential bottlenecks.Thanks in advance for your help!
Beta Was this translation helpful? Give feedback.
All reactions