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
I'm trying to load this up into our workspace and as long as I use the built-in React DOM elements everything is good. But when I try to load up a ReasonReact component I get the following message:
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.
// CustomDiv.re
[@react.component]
let make = (~children) => <div> children->React.string </div>;
// CustomDivStories.re
open BsStorybook.Story;
let _module = [%bs.raw "module"];
storiesOf("CustomDiv Story", _module)
->add("Chapter I", () => <CustomDiv "Hello bs-storybook!" </CustomDiv>);
What am I doing wrong?
The text was updated successfully, but these errors were encountered:
Without digging much, The issue comes from importing a component that it's undefined instead of a fn. This usually happens when you have a bug in your import/export code. In this case, since it's compiled could you take a look at *.bs.js? (Those are always right, they return properly components and functions).
You can try to eliminate the error, inlining your component inside the story?
👋
I'm trying to load this up into our workspace and as long as I use the built-in React DOM elements everything is good. But when I try to load up a ReasonReact component I get the following message:
What am I doing wrong?
The text was updated successfully, but these errors were encountered: