You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just had a really weird bug I want to document. I was using the import as expected:
import Hamburger from "hamburger-react";
and for some reason I was running into this issue, Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object. which means that my import wasn't right.
Super weird since the default import is already specified and it works in development, but it fails when I run npm run build
If I change the import to import {Squash as Hamburger} from 'hamburger-react';, it works again.
The text was updated successfully, but these errors were encountered:
@im-calvin I also had a problem with the default-exported Hamburger, and importing the concrete kind of it (I used Squash) resolved it – now I can't reproduce it after a quick attempt to get back to the default import, but my problem was related to React, and I had a wrapper component for the Hamburger using the Astro-React integration
Just had a really weird bug I want to document. I was using the import as expected:
import Hamburger from "hamburger-react";
and for some reason I was running into this issue,
Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object.
which means that my import wasn't right.Super weird since the default import is already specified and it works in development, but it fails when I run
npm run build
If I change the import to
import {Squash as Hamburger} from 'hamburger-react';
, it works again.The text was updated successfully, but these errors were encountered: