Release v3.9.5 broke layout prop
See original GitHub issueWhat 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:
Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.
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
- React-admin version: v3.9.5
- Last version that did not exhibit the issue (if applicable): v3.9.4
- React version: 17.0.1
- Browser: Google Chrom
- Stack trace (in case of a JS error):
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
eui/CHANGELOG.md at main · elastic/eui - GitHub
Note: this release broke usage of EUI in non-ES Module compatible environments. This is fixed in 5.5.0 . Added 3 new icons —...
Read more >CSS Inline Layout Module Level 3 - W3C
This property specifies the box's alignment baseline : the baseline used to align the box prior to applying its post-alignment shift (if ...
Read more >Release Notes — Izenda BI 4.0.0 documentation
Defect 30368 Dashboard section UI is broken on schedule page of dashboard; Defect 30369 Print layouts : Getting error while printing after selecting...
Read more >Release Notes - Ranorex
Ranorex 10.5.1 Release (December 6, 2022). Bugs. Ranorex now upgrades successfully to 10.1.4. Ranorex Remote Agent no longer uses the Runtime Floating ...
Read more >Release notes | Org mode
Version 9.6. Important announcements and breaking changes. python-mode.el (MELPA) support in ob- ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It’s because we use internally
createElement
for theappBar
, andcloneElement
for theuserMenu
. But it’s difficult to change it at the moment because it’ll introduce a breaking change. We need to think about it for the v4.Could you please tell me why in AppBar for example you don’t need to pass as a react element?
this works:
return <Layout {...props} appBar={CustomAppBar} />;