Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[Doc] Aside component for Show view is injected as element #6372

Closed
smeng9 opened this issue Jun 20, 2021 · 1 comment · Fixed by #6376
Closed

[Doc] Aside component for Show view is injected as element #6372

smeng9 opened this issue Jun 20, 2021 · 1 comment · Fixed by #6376
Assignees

Comments

@smeng9
Copy link
Contributor

smeng9 commented Jun 20, 2021

What you were expecting:

I expect the document to match the behavior of code. However, the code snippet in https://github.com/marmelab/react-admin/blob/43c4fafc8bcedebc386c7d3dc3b63cfd56420a17/docs/Show.md#aside-component throws error.

The actual implementation here

requires an element.

The <Show aside={Aside} {...props}> should be <Show aside={<Aside />} {...props}> to make it work.

Other information:

Fixing the doc should be simple. But what I want to bring up is, it is not very consistent with #3246 and #3262 introduced for 3.0

What should we do? Change the code now, change the document, or wait and introduce another breaking change in 4.0 #5933 ?

Environment

  • React-admin version: 3.16
  • Last version that did not exhibit the issue (if applicable):
  • React version: 17
  • Browser: Edge 90
  • Stack trace (in case of a JS error):
@fzaninotto
Copy link
Member

Thanks for pointing this out! Indeed, the doc must be fixed.

FYI, we have reverted the #3262 in #3312. We still expect users to inject elements.

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

Successfully merging a pull request may close this issue.

2 participants