← Code LabReact Native0/50 solved · 0%
Navigation · medium

27. Matching a linking route pattern

Map a deep link URL to a screen + params.

Write `matchRoute(url, routes)` where `routes` is `{ pattern: string, screen: string }[]` with patterns like `"tx/:hash"`. Return `{ screen, params }` for the first match, or `null`.
Required in your answer: startsWith(":")