Skip to content

Custom route in <Switch/> v4 doesn't seem to work #4576

@donaldpipowitch

Description

@donaldpipowitch

Version

"react-router-dom": "^4.0.0-beta.5"

Test Case

import { Switch, Route } from 'react-router-dom'

const Foo = () => <Route path="/" component={Home}/>

<Switch>
  <Foo/>
</Switch>

Expected Behavior

Should behave like this:

import { Switch, Route } from 'react-router-dom'

<Switch>
  <Route path="/" component={Home}/>
</Switch>

Actual Behavior

It looks like nothing is rendered?

(Note: Is there any jsfiddle/jsbin template for v4? Only found v2.)

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