Closed DullReferenceException closed 6 years ago
The first sample has a route name blog
which can be used to link to it. It will render the page component with the same name. It could use a different page component if that was given as a third argument.
The second sample has no name, it can only be linked to using the pattern. It will render the page complex
I agree the docs could explain this better, pull requests very welcome!
Thanks for the explanation. Here's a possible way to make things clearer: https://github.com/fridays/next-routes/pull/200
Thanks!
Maybe this is a simple typo, but in the documentation, the overloads for
.add(...)
are listed as:...but the sample are given as:
...and these two samples seem to be conflicting on whether the name or the pattern comes first in the case of the two-argument overload: