I'm loading user info and env variables in the root loader. Since categories don't change often I decided to load it in the root loader and get it with useMatches.
The problem is when I update categories, I want to refetch the categories in the root loader. I tried fetcher.load in a hope that it would update the userLoaderData but in this thread https://discord.com/channels/770287896669978684/1032572868724277268 @raw grove mentions that fetcher.load doesn't update the userLoaderData.
I don't want to refetch categories every time a modal is opened that's why I decided to fetch it in the root loader. Another option would be is to maintain a state and use it with context and after adding a new category update the state.