preactjs/preact-router

Sorting routes by rank

Open

#63 创建于 2016年8月17日

在 GitHub 查看
 (1 评论) (0 反应) (0 负责人)JavaScript (152 fork)github user discovery
enhancementhelp wanted

仓库指标

Star
 (1,055 star)
PR 合并指标
 (PR 指标待抓取)

描述

<Router> component now sorts routes by count of path segments or by path string length as a fallback.

Maybe it would helpful allow programmers to specify rank explicitly?

This can be done with new rank attribute for route component. Or with using key attribute as rank. Or with preserving order of <Router> component children when counts of path segments are equal (stable sort).

贡献者指南