Randomize result ordering in InstantSearch.js

Is there a way to display results in random order with instantsearch.js?

I see there’s a stackoverflow answer on this but it looks outdated as transformData no longer support this.

Hi @dan3, Can you demonstrate using our InstantSearch.js template that this is no more working?

So that we can then see how to do it. Thanks!

Here it is: https://codesandbox.io/s/2xr18ko8y

The stackoverflow solution used transformData.allItems which looks like it’s deprecated.

somebody has some news on this?

it has been deprecated, you’re right.
Now you can use transformItems instead.
I’ve modified your sandbox to reflect this: https://codesandbox.io/s/v324pzmw10

I hope this helps @tsmits, too.