I hadn’t noticed that ![]()
Unfortunately the initial problem still remains.
A developer is encountering a 404 error when trying to pass an order ID through the URL in a Remix Shopify app. When clicking a link to view invoices with an order ID (e.g., /app/invoices/5595712848006), the app treats the ID as a page route rather than a dynamic parameter.
Initial Problem:
<Link to={/app/invoices/${order.id}}> in orders.tsxapp.invoices.[id].tsx but accessing wrong parameter nameAttempted Solutions:
params.orderId to params.id to match the [id] filename conventionWorking Solution:
app.invoices.$orderId.tsx (using $ instead of [] for dynamic segments)params.orderId in the componentuseParams() from @remix-run/react to retrieve route parametersThe issue appears resolved with the proper Remix file naming convention for dynamic routes using the $ prefix rather than bracket notation.
I hadn’t noticed that ![]()
Unfortunately the initial problem still remains.