Analytics & Reports
Analytics

Selectors

View all selector definitions.

Selectors are functions that allow you to more easily access different data in your store. The selectors all follow the same format:

this.flux.selectors.functionName(state, options?)
  • functionName is the name of the selector
  • state is the current store, which can be accessed in any tag through this.flux.store.getState()
  • options are any additional optional parameters needed for the selector to find the data

Example

To access a specific navigation object in the store, you can use the following code:

this.flux.selectors.navigation(this.flux.store.getState(), 'my-navigation')

Where 'my-navigation' is the navigationId of the navigation you want to retrieve.