Renders <noscript> tag when clicking <Link> using catch-all route.
See original GitHub issueHey!
This are my routes currently:
export default (
<Route path="/">
<DefaultRoute handler={Main} />
<Route path="*" handler={Main} />
</Route>
);
I am using the <Link> tags like so:
<Link to={this.props.menu[menuItem]} className="ps-fg-color-hover">
{menuItem}
</Link>
When I click the link it created all I get is this:
<div id="react-root">
<noscript data-reactid=".tnbb9lc2dc"></noscript>
</div>
Any idea how/why this happens?
Thanks!
EDIT: When I do a full refresh it does render correctly with server side rendering too. But when I click a link it goes to the blank page with the <noscript> tag.
EDIT2:
The weird thing is that the url does change but it doesn’t seem to call the Main
render method or even componentWillMount method at all.
Issue Analytics
- State:
- Created 8 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Renders <noscript> tag when clicking <Link> using catch-all ...
Hey! This are my routes currently: export default ( ); I am using the tags like so: ... Renders <noscript> tag when clicking...
Read more ><noscript> when using react-router v2 with browser history
I tried to use the browserHistory to make the clean URLs, but when I access the web page, the page is blank and...
Read more >Changelog - NoScript: block scripts and own your browser!
The NoScript Security Suite is a free extensions for Firefox, Chrome and other browsers, preemptively blocks malicious scripts and allows JavaScript and ...
Read more >“on button click navigate to another url page in react js” Code ...
Answers related to “on button click navigate to another url page in react js”. onclick redirect to url · open a new tab...
Read more >[Solved]-Vue-Router won't work when a route is activated-Vue.js
You need to watch for param changes in the $route and perform the correct action (e.g. making an ajax call to retrieve the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@dennis-van-bennekom FWIW, I ran into this same problem just now using react-router 1.0. The paths existed, but still the
<noscript>
stuff was showing up in my DOM. As it turns out, the problem I had was how I was importing.wrong:
right:
You’re probably well past this error by now, but thought I’d throw in this note in case anyone else encounters the same problem. Thanks!
You need to run
match
on the client side. See https://github.com/rackt/react-router/issues/2036.There’s a full example demonstrating this on rackt/async-props.