renderItem on Polaris ResourceList renders multiple times?

FurnaceX
Shopify Partner
25 2 24

I'm using the Polaris component ResourceList.  I set the renderItem with extensive (ie. cpu intensive) code.  The code seems to run multiple times even thought the "items" are constant and never changed.

 

I've created a test code sandbox you can see here.  Look at the console output:

https://codesandbox.io/s/ecstatic-shaw-ptq7n?file=/App.js

 

Am I understanding this correctly? It seems that it is rendering the items 4 times.

 

Should it be behaving this way?

 

0 Likes