You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Index routes cannot have children. In this regard, the idea arises of using routes with path='' as "index routes".
For example, we have a page that displays a list (path='groups'). We also have routes for adding (path='groups/add') and editing list item (path='groups/:groupId/edit'). These routes should not replace, but complement the original page. Also, each list item (group) corresponds to another page (path='groups/:groupId/items') displays another list. Whch also have routes for adding (path='groups/:groupId/items/add') and editing list item (path='groups/:groupId/items/:itemId/edit'). The result is the following routes object:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Index routes cannot have children. In this regard, the idea arises of using routes with path='' as "index routes".
For example, we have a page that displays a list (path='groups'). We also have routes for adding (path='groups/add') and editing list item (path='groups/:groupId/edit'). These routes should not replace, but complement the original page. Also, each list item (group) corresponds to another page (path='groups/:groupId/items') displays another list. Whch also have routes for adding (path='groups/:groupId/items/add') and editing list item (path='groups/:groupId/items/:itemId/edit'). The result is the following routes object:
Is it bad to use routes with path='' as index routes? If so, why?
Are there better approaches to implementing the described user interface?
Beta Was this translation helpful? Give feedback.
All reactions