• Bootcamp (9)
    • 📱 236 - 992 - 3846

      📧 jxjwilliam@gmail.com

    • Version: ‍🚀 1.1.0
  • React Router

    BootcampFrontend2020-12-17


    https://reacttraining.com/react-router/web/api/match

    history objects typically have the following properties and methods:

    1. length - (number) The number of entries in the history stack
    2. action - (string) The current action (PUSH, REPLACE, or POP)
    3. location - (object) The current location. May have the following properties:
    4. pathname - (string) The path of the URL
    5. search - (string) The URL query string
    6. hash - (string) The URL hash fragment
    7. state - (string) location-specific state that was provided to e.g. push(path, state) when this location was pushed onto the stack. Only available in browser and memory history.
    8. push(path, [state]) - (function) Pushes a new entry onto the history stack
    9. replace(path, [state]) - (function) Replaces the current entry on the history stack
    10. go(n) - (function) Moves the pointer in the history stack by n entries
    11. goBack() - (function) Equivalent to go(-1)
    12. goForward() - (function) Equivalent to go(1)
    13. block(prompt) - (function) Prevents navigation (see the history docs)