I was disappointed to see that in the docs it says Loading UI components do not accept any parameters, I was hoping they would be able to read URL params and searchParams similar to page components since the Loading UI is initiated after the request that contains the URL.
If this isn't technically possible I understand, but, if it is I would definitely like to see this feature be added to the loading.js files.
Currently, I'm getting around it by using the "use client" directive and then calling usePathname() to read the params. Which works perfectly fine, just not ideal for it to be a client component for something that should be accessible on the server-side afaik.
In my case, the UI that is being shown is based off a selected category (dynamic route) and I want the Loading UI to reflect that as well, so this was my only option since I obviously do not want to fetch the category in my Loading UI.