Showing results on load

Hi newbie question here, but i’ve been trying to accomplish this for days without success.

Im using instantsearch.js.

How do I perform a default query and show the results on a hits widget?

For this specific widget I don’t want the user to type in the search, but I want the page to load showing the result of a default search.

I’ve come close with the query parameter, but I couldn’t figure out where to add it.

Here’s a codesandbox with my example.

Any help will be very appreciated!

I got this one.

    hitsPerPage: 20,
    query: 'ball'

The thing I was getting wrong is that the configure widget needs to be declared after the hits widget.

You can see the codesandbox above with the updated working code.