robust-apricot
robust-apricot10mo ago

Hello, I originally asked this question

Hello, I originally asked this question to kapa, which suggested I reach out to the wider community: I want to create a dynamic list of resources available to the user at login time by fetching a list of their permissions from a backend server. Is there a way to add resources to the IResourceItem list provided to the <Refine> tag after its instantiation? Or to not provide a resources property to <Refine> initially and then set it later? The goal is to dynamically construct the menu options for a <ThemedLayoutV2> component as well as setup the associated routes based on user permissions with a call to my data provider.
1 Reply
conscious-sapphire
conscious-sapphire10mo ago
I think you can mount the <Refine> component after the resources are ready, rather than giving the resource array dynamically.