Beispiel #1
0
 /**
  * Replace the top state onto the history stack. The first argument is the
  * state object to place at the top of the stack; the second argument is the
  * new title for the window. An optional third argument is the new URL to
  * display in the navigation bar.
  *
  * @param state - An object to push onto the stack
  * @param title - A string to set as the window title
  * @param url (optional) - The URL to show in the navigation bar
  */
 replaceState(state: any, title: any, url: ?any): Promise<any> {
   return RCTHistory.replaceState(state, title, url);
 }
Beispiel #2
0
 /**
  * Takes a number of steps, and moves the history by that delta. Returns a
  * Promise that is resolved after the move is completed.
  *
  * @param delta - The number of steps to move the current history state. A
  *   positive number moves the history forward, a negative number moves the
  *   history back.
  */
 go(delta: number): Promise<any> {
   return RCTHistory.go(delta);
 }
Beispiel #3
0
 /**
  * Returns a Promise that is resolved after the history is moved forward
  */
 forward(): Promise<any> {
   return RCTHistory.forward();
 }
Beispiel #4
0
 /**
  * Returns a Promise that is resolved after the history is moved back
  */
 back(): Promise<any> {
   return RCTHistory.back();
 }
Beispiel #5
0
 /**
  * Returns a Promise that is resolved with the current history state
  */
 state(): Promise<any> {
   return RCTHistory.state();
 }
Beispiel #6
0
 /**
  * Returns a Promise that is resolved with the current history length
  */
 length(): Promise<any> {
   return RCTHistory.length();
 }