react-router-path-list
A (potentially naive) way to get an array of paths from a react-router path definition.
Usage
Install it: npm i --save react-router-path-list
.
Then use it:
; const paths = ;// components removed for brevity
paths
will be equal to:
'/' '/hello' '/hello/world'
Why
Probsbly lots of things, but I need it to generate a list of paths for use with a react static site generator.
Contributing
Ideas, comments, and pull requests welcome.