Skip to main content

Events

If you are embedding a React app inside an existing multi-page app, you can use global events to modify the API's state from outside of the React app.

Events

There are four events to modify the state:
fast-simon-update-query: Accepts a new query as a string argument
fast-simon-update-page: Accepts a new page as a number argument
fast-simon-update-sort: Accepts a new sort as a SortBy argument
fast-simon-update-narrow: Accepts a new Narrow as sNarrow[] argument
fast-simon-update-collection: Accepts an id as a string argument

Example

    window.dispatchEvent(new CustomEvent('fast-simon-update-query', {detail: 'dress'}));