question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Release v3.9.5 broke layout prop

See original GitHub issue

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:

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): image

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Luwangelcommented, Oct 27, 2020

It’s because we use internally createElement for the appBar, and cloneElement for the userMenu. 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.

0reactions
mariaefi29commented, Oct 27, 2020

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} />;

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found