Complete guide for building beautiful apps with Expo Router. Covers fundamentals, styling, components, navigation, animations, patterns, and native tabs.
中文简介正在准备中。当前显示原文说明。
Implement masked modal routes in NowStack Mobile web-app. Use for TanStack Start route masks, shareable detail URLs, back-to-close, and refresh-to-page behavior.
中文简介正在准备中。当前显示原文说明。
查看安装方法安装前可以查看交给 AI 代理的指令内容。
Current route shape:
/, /privacy, /cgv, /support/app/admin (redirects to /admin/users), /admin/users, /admin/users/$userIdThe examples below use a hypothetical /admin/items list/detail flow to illustrate the pattern.
</scope>
/admin/items./admin/items/$itemId./admin/items list visible and opens a modal/sheet with the detail./admin/items./admin/items/$itemId renders the full detail page.
</behavior>
<core_pattern> Navigate to the source route internally, store modal state in source route search, and mask the visible URL as the destination route.
<Link
to="/admin/items"
search={{ itemId: item._id }}
mask={{
to: "/admin/items/$itemId",
params: { itemId: item._id },
unmaskOnReload: true,
}}
resetScroll={false}
>
View
</Link>
The source route owns modal state:
type ItemsSearch = {
itemId?: string;
};
export const Route = createFileRoute("/admin/items")({
validateSearch: (search: Record<string, unknown>): ItemsSearch => ({
itemId:
typeof search.itemId === "string" && search.itemId.length > 0
? search.itemId
: undefined,
}),
component: AdminItemsPage,
});
The destination route remains a real route:
export const Route = createFileRoute("/admin/items/$itemId")({
component: AdminItemDetailPage,
});
</core_pattern>
<closing> Use `location.maskedLocation` before deciding whether close should call `history.back()`.const router = useRouter();
const location = useLocation();
const closeModal = () => {
if (location.maskedLocation) {
router.history.back();
return;
}
void router.navigate({
to: "/admin/items",
search: {},
replace: true,
});
};
If the modal has an "Open full page" action, navigate directly and do not call the close handler first:
void router.navigate({
to: "/admin/items/$itemId",
params: { itemId },
replace: true,
});
</closing>
<rules>
- Keep the destination route real and directly visitable.
- Use `mask={{ to: destination, params, unmaskOnReload: true }}`.
- Keep modal state in internal route search, not visible `?modal=...` URLs.
- Close with `history.back()` only when `location.maskedLocation` exists.
- Do not call close immediately before navigating to the full page.
- Preserve auth/admin route guards already present in `web-app/app/routes/admin/route.tsx`.
</rules>
<verification>
Run:
cd web-app && npm run typecheck
cd web-app && npm run build
Then verify manually or with browser automation:
还没有评价。欢迎分享你的使用感受。
无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。
还没有评论。来写第一条吧。
Complete guide for building beautiful apps with Expo Router. Covers fundamentals, styling, components, navigation, animations, patterns, and native tabs.
中文简介正在准备中。当前显示原文说明。
Routes general Convex requests to the right project skill. Use when the user asks which Convex skill to use or gives an underspecified Convex app task.
中文简介正在准备中。当前显示原文说明。
Use when optimizing Convex database read bandwidth, documents-read cost, query indexes, full-table scans, function-level usage dashboard findings, or code that uses .filter(), unbounded .collect(), N+1 reads, or expensive reactive Convex queries.
中文简介正在准备中。当前显示原文说明。
Build reusable Convex components with isolated tables and app-facing wrappers. Use for defineComponent, app.use, ComponentApi, or shared backend modules.
中文简介正在准备中。当前显示原文说明。
Plan safe Convex schema and data migrations. Use for widen-migrate-narrow rollouts, backfills, breaking field changes, table splits, or failed schema deploys.
中文简介正在准备中。当前显示原文说明。
Audit Convex performance for hot reads, write contention, subscriptions, function limits, OCC conflicts, latency, read amplification, and expensive reactive queries.
中文简介正在准备中。当前显示原文说明。