kriasoft / universal-router

A simple middleware-style router for isomorphic JavaScript web apps
https://www.kriasoft.com/universal-router/
MIT License
1.7k stars 105 forks source link

add "empty list as catch-all" behavior to API docs. #208

Closed MoralCode closed 2 years ago

MoralCode commented 2 years ago

Documented the usecase where an empty list passed to the children property of a route acts as a catch-all.

Source: https://gitter.im/kriasoft/universal-router?at=616713298c019f0d0b32350e

It might be useful to test the code examples since i mostly just guessed at what the return values would be instead of actually testing them.

Types of changes

Checklist:

codecov-commenter commented 2 years ago

Codecov Report

Merging #208 (07a7baa) into main (0dd2661) will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##              main      #208   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            3         3           
  Lines          229       229           
  Branches        66        66           
=========================================
  Hits           229       229           

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 0dd2661...07a7baa. Read the comment docs.