Set View

Opens a specific UI menu area based on the name of the menu and the view object parameters.

Syntax

store.dispatch({ type: "SET_VIEWS", payload: views, meta: { name, auto: false } });

Parameters

views

A View object that specifies which view to open.

name

The type of view action to execute. A list of available view actions can be found here.

Examples

Opens the editor view.

store.dispatch({
  type: "SET_VIEWS",
  payload: { "Main": "editor", "About": null, "TrackLoader": null },
  meta: { name: "ENTER_EDITOR", auto: false }
});

Toggles the sidebar settings page.

store.dispatch({
  type: "SET_VIEWS",
  payload: { "Sidebar": "settings" },
  meta: { name: "SET_SIDEBAR_PAGE", auto: false }
});

Closes the sidebar.

store.dispatch({
  type: "SET_VIEWS",
  payload: { "Sidebar": null },
  meta: { name: "SET_SIDEBAR_PAGE", auto: false }
});