Answer the question
In order to leave comments, you need to log in
What kind of error is so interesting?
Everything works
here codepen.io/bradwestfall/pen/reaWYL
But not here
prntscr.com/ejg93i
prntscr.com/ejg9ay
In script.js the same code as on codepen
Answer the question
In order to leave comments, you need to log in
Probably, at the time of accessing the props or some property, it has not yet been transferred. Maybe something comes from the base or something like that
According to the screenshots, I can only translate:
There is no way to read the location, which was read from some variable .. and you did not pass this variable.
Further, if you look at the codePen, there is a comment:
// Note that with how CodePen works, I wasn't able to get the browserHistory to work
// as the article suggests. The demo works without it, but you'll want to be sure to
// use it in a real application
Which says that browserHistory is not connected here (on the codepen)... Putting it
together, most likely, you need it, so how location was read directly from it or from somewhere ...
There is no variable (it means undefined instead), it means js is trying to execute
Which returns an error.
Cannot read propery location of 'undefined' - react.min.js file
location
is in the object window
. <head></head>
), <body></body>
it has not yet been parsed, which means that the DOM has not been initialized. and this implies that window === undefined. script.js
in the last line <body></body>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question