MCPcopy Index your code
hub / github.com/react-navigation/react-navigation / jumpToIndex

Function jumpToIndex

packages/core/src/StateUtils.js:78–89  ·  view source on GitHub ↗

* Sets the focused route of the navigation state by index.

(state, index)

Source from the content-addressed store, hash-verified

76 * Sets the focused route of the navigation state by index.
77 */
78 jumpToIndex(state, index) {
79 if (index === state.index) {
80 return state;
81 }
82
83 invariant(!!state.routes[index], 'invalid index %s to jump to', index);
84
85 return {
86 ...state,
87 index,
88 };
89 },
90
91 /**
92 * Sets the focused route of the navigation state by key.

Callers

nothing calls this directly

Calls 1

invariantFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…