question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Renders <noscript> tag when clicking <Link> using catch-all route.

See original GitHub issue

Hey!

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:closed
  • Created 8 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
andyenglecommented, Nov 2, 2015

@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:

import Link from 'react-router';

right:

import {Link} from 'react-router';

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!

0reactions
taioncommented, Dec 9, 2015

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found