React Router: get all routes as array

后端 未结 3 1330
无人及你
无人及你 2021-01-04 03:36

Is there an existing library that will reduce my route instance to an array of paths?

Example:

    

        
3条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-04 03:57

    I don't understand why you need a library. Your Routes should be available as an Array in the props.

    An example:

提交回复
热议问题