Error: elements are for router configuration only
up vote
0
down vote
favorite
This is the portion of the code that does the redirection:
render() {
return <div>
<Router>
<Switch>
<Route path='/:locale(en|he)' component={this.routes} />
<Redirect to="`${props.location.pathname}/he`"/>
</Switch>
</Router>
</div>
}
Any idea how to fix this error?
react-router-v4
add a comment |
up vote
0
down vote
favorite
This is the portion of the code that does the redirection:
render() {
return <div>
<Router>
<Switch>
<Route path='/:locale(en|he)' component={this.routes} />
<Redirect to="`${props.location.pathname}/he`"/>
</Switch>
</Router>
</div>
}
Any idea how to fix this error?
react-router-v4
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
This is the portion of the code that does the redirection:
render() {
return <div>
<Router>
<Switch>
<Route path='/:locale(en|he)' component={this.routes} />
<Redirect to="`${props.location.pathname}/he`"/>
</Switch>
</Router>
</div>
}
Any idea how to fix this error?
react-router-v4
This is the portion of the code that does the redirection:
render() {
return <div>
<Router>
<Switch>
<Route path='/:locale(en|he)' component={this.routes} />
<Redirect to="`${props.location.pathname}/he`"/>
</Switch>
</Router>
</div>
}
Any idea how to fix this error?
react-router-v4
react-router-v4
asked Nov 10 at 17:27
Chaim
124
124
add a comment |
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
draft saved
draft discarded
draft saved
draft discarded
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53241559%2ferror-redirect-elements-are-for-router-configuration-only%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown