dialectlabs / react

Home Page:https://react-notifications-solana.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Warning: React.createElement: type is invalid

sofven opened this issue · comments

Hi. We can't seem to make the react ui component work. We're getting this error:

Screen Shot 2022-03-25 at 12 40 34 PM

function WrappedNotificationsButton(props) {
  const wrapperRef = (0, react_1.useRef)(null);  <--- The first link points to this line 
  const bellRef = (0, react_1.useRef)(null);
  const [open, setOpen] = (0, react_1.useState)(false);
  ...

We're using these versions:

"dependencies": {
    "@dialectlabs/react": "^0.1.7",
    "@dialectlabs/react-ui": "^0.1.16",
    ...
    "react": "^17.0.2",
    "react-dom": "^17.0.2",
    "react-scripts": "^5.0.0",
    ...
}

Thank you.

Hey there @sofven! Thanks for creating this issue. Actually we've noticed it as well recently and currently working on a fix.

A follow-up question: I'm guessing you are using CRA with webpack 5, is that correct?

Here is a PR with a potential fix that should resolve this issue - #41

Hi. Thank you for the response. Yes, we're using CRA 5. Will check this, thanks!

@sofven Hey! We've released react-ui@0.2.0 that has this fixed. Please try it out. :)

Let me know if it works for you. Thanks!

Hi. Yes, it works now after being updated to 0.2.0! Thank you!