Skip to content
Discussion options

You must be logged in to vote

Hi, I removed these codes, and the problem solved.

const ExampleComponent = ({ location }) => { // don't use location prop
   if (!location) return "" // remove these line

   return <p>{ location.href }</p>
}

Replies: 5 comments 4 replies

Comment options

You must be logged in to vote
1 reply
@xerenahmed
Comment options

Comment options

You must be logged in to vote
3 replies
@xerenahmed
Comment options

@KyleAMathews
Comment options

@xerenahmed
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by xerenahmed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #29475 on February 12, 2021 15:20.