-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Release v3.9.5 broke layout prop #5443
Comments
Hi, thanks for reporting this issue. It's probably related to my PR #5421. I let you know as soon as I understand what is wrong. |
Hi again, You issue is not related to my changes because they haven't been released yet. But I found your issue:
You need to pass a ReactElement to the const MyAppBar = props => <AppBar {...props} userMenu={<MyUserMenu />} />; Regards, |
@Luwangel Oh, thank you so much!!! |
Could you please tell me why in AppBar for example you don't need to pass as a react element? this works: |
It's because we use internally |
What you were expecting:
On v3.9.4 I used layout prop and passed in it my custom layout component.
What happened instead:
After upgrading to v3.9.5 I started getting the following error and the app stoped working:
Steps to reproduce:
I was able to identify the problem and it turned out to be with a custom layout component.
Related code:
https://codesandbox.io/s/cranky-sanderson-2l2tm?fontsize=14&hidenavigation=1&theme=dark&file=/src/App.tsx
If you comment out the layout component, everything works. If you add it again, the app break with the error that I specified above.
Environment
The text was updated successfully, but these errors were encountered: