Skip to content
Discussion options

You must be logged in to vote

@dosu I found a workaround to fix this, even without the experimental flag. Instead of having a separate ComponentElement, inlining the Object.assign fixes it. I'll leave this here in case someone else runs into this:

// Component.tsx
const ComponentGroup = (props) => return <ComponentThings {...props} ref={ref} />;

/** Component Description **/
export const Component = Object.assign(
  forwardRef(function ComponentElement (props, ref) { return <ComponentThings {...props} ref={ref} />}), 
  {
    /** Component.Group Description **/
    Group: ComponentGroup,
  }
);

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@dosubot
Comment options

@w-a-t-s-o-n
Comment options

@dosubot
Comment options

@w-a-t-s-o-n
Comment options

Answer selected by w-a-t-s-o-n
@dosubot
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
1 participant