Skip to content

this is undefined in production but not dev mode #284

Closed
@sotojuan

Description

@sotojuan

We have an app that we ported over to this CLI tool and it works perfectly in development mode. However, if we run the build folder in a server (using pushstate-server) we get:

Uncaught TypeError: Cannot read property 'props' of undefined

The component is simple:

class AuthLayout extends React.Component {
  render() {
    return (
      <div id="auth-layout">
        <div id="auth-content">
          <this.props.views.content />
        </div>
      </div>
    )
  }
}

Like I said, this works great in dev mode. Why not in production?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions