Closed webberwang closed 1 year ago
From the usage docs of path-to-regexp
Please note: The RegExp returned by path-to-regexp is intended for ordered data (e.g. pathnames, hostnames). It does not handle arbitrary data (e.g. query strings, URL fragments, JSON, etc).
The following are synonymous as I understand it
routes.add('page', '/page')
'/page?action=create'
'/page?action=delete'
routes.add('page', '/page/:action')
'/page/create`
'/page/delete`
const { action } = query
@elkwood the 2nd approach :action creates a new route though
Can we do something like
as opposed to
because modals should be a child of the parent component in order to keep the background state, as opposed to creating its own route