Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Documentation about setting resources dynamically is outdated #4629

Closed
WiXSL opened this issue Apr 2, 2020 · 4 comments · Fixed by #5004
Closed

Documentation about setting resources dynamically is outdated #4629

WiXSL opened this issue Apr 2, 2020 · 4 comments · Fixed by #5004

Comments

@WiXSL
Copy link
Contributor

WiXSL commented Apr 2, 2020

Current:
https://marmelab.com/react-admin/doc/3.3/Admin.html#declaring-resources-at-runtime

New:
#3907

I'll see if I find some time to do this, no warranties.

@WiXSL WiXSL changed the title Setting resources dynamically documentation is outdated Documentation about setting resources dynamically is outdated Apr 2, 2020
@Kmaschta
Copy link
Contributor

Kmaschta commented Apr 7, 2020

That would be awesome :)

@fzaninotto
Copy link
Member

I don't understand, we don't enforce the usage of <AdminUI>, and the previous way still works... Can you be more specific?

@WiXSL
Copy link
Contributor Author

WiXSL commented Apr 7, 2020

Of course, I don't say to remove the current way to do it but to add documentation about your solution here #3907 for cases where for example (quoting):

... even if <Admin> accepts a function as child, this function can't execute hooks. So it's impossible, for instance, to have a dynamic list of resources based on a call to the dataProvider (since the dataProvider is only defined after the Admin component renders). Many people use the Custom App approach just because of that, and they have to rewrite too much code.

@fzaninotto
Copy link
Member

Understood. A PR is welcome!

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants