Answer copied from the duplicate GitHub issue you filed ;)
This creates a new function prop each time you render:
rowHeight={({ index }) => 50}
The prop-change is sufficient to trigger a re-render of the child component even if no other properties changed. In the second example above, no props change at all and so List
doesn't know it needs to re-render. (Check out the section on "pure components" in the docs for more info.)
In this case, you could pass a small attribute that changes each time sort order changes (eg an incremented counter) to let the component know to re-render. You could also call forceUpdate
.