Skip to content
This repository was archived by the owner on Aug 1, 2018. It is now read-only.
This repository was archived by the owner on Aug 1, 2018. It is now read-only.

React.forwardRef breaks SSR on prepare #115

Description

@rynocouse

Type of issue

bug

Description

When wrapping a stateless component in a React.forwardRef SSR breaks on prepare.

Current behavior

Error:

TypeError: type is not a function
[36m at prepareElement node_modules/fusion-react-async/src/prepare.js:59:29�

Component:

const Slide = React.forwardRef((props: Props, ref) => {
  return (
     <Styled.SlideOpacity
       $active={props.active}
       $leavingActive={props.leavingActive}
       $ref={ref}
    >
       {props.children}
    </Styled.SlideOpacity>
   );
});

Expected behavior

Wrapping stateless component in React.forwardRef should render SSR without an error.
React Docs - Forwarding Refs

Steps to reproduce

  1. Wrap a stateless component in React.forwardRef
  2. Reload page

Your environment

  • fusion-react-async version: 1.2.3

  • Node.js version: v8.11.3

  • npm version: 5.6.0

  • Operating System: OSX 10.13.5

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions