ResourceList force an update when items prop reference change
              
              #7623
            
            
              
                Unanswered
              
          
                  
                    
                      pedrodurek
                    
                  
                
                  asked this question in
                General
              
            Replies: 0 comments
  
    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.
-
Why do we force an update whenever the
itemsprop fromResourceListchange? This forces us to pass a stable reference, otherwise it may cause unnecessary rerenders or/and unwanted behaviour. There are many places acrossShopify/webwhere items are not stable because its original value is being formatted (e.g.: usingmaporfilter) withoutuseMemo. For example:or even
That's an issue even for stable references, whenever the reference changes, it'll force the
ResourceListto rerender twice.Beta Was this translation helpful? Give feedback.
All reactions