Chapter 7: Using Hooks for Routing

  1. Why do we need to define separate pages?
    • Most large apps consist of multiple pages. For example, a separate page for each blog post
  2. How do we define routes using the Navi library?
    • We use the mount function and pass an object mapping path to route functions
  3. How do we define routes with URL parameters?
    • We can use the :parameter syntax to specify URL parameters within the path
  1. How are static links defined with Navi?
    • Static links can be defined using the Link component from react-navi
  2. How can we implement dynamic navigation?
    • Dynamic navigation can be implemented using the useNavigation Hook and calling navigation.navigate()
  3. Which Hook is used to access route information of the current route?
    • The useCurrentRoute Hook gives us all information about the current route
  4. Which Hook is used to access route information of the currently loading route?
    • The useLoadingRoute Hook gives us all information about the route that is currently being loaded
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.161.116