Skip to content
This repository was archived by the owner on Jun 15, 2026. It is now read-only.
This repository was archived by the owner on Jun 15, 2026. It is now read-only.

SplitView Problem with React Router #44

Description

@mush42

Hi,

I am facing a problem with Winjs and React Router when using the SplitView component.

Those are my components:

<Router>
  <App />
<Router>

``` app.js
<MySplitView>
  <Route exact path="/" component={Home}/>
</MySplitView>

```mySplitView.js
<Winjs.SplitView
  style={{height: "calc(100% - 48px)"}}
  paneComponent={<div>Navigation</div>}
  contentComponent={<div>{this.props.children}</div>}
  onAfterClose={this.handleAfterClose}
  closedDisplayMode="inline"
  openedDisplayMode="inline"
  paneOpened={this.state.paneOpened}/>

The error message is:
"TypeError: _ref2 is undefined
computeMatch"

And when using the `Switch` component from `react-router' I get a diffrent error regarding the context:
"TypeError: this.context.router is undefined"

So, I suggest that the SplitView component does not initialize the context correctly. 

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions