Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I am working on a react app and I have encountered an error which is when the user logged in, the app will push the user to the dashboard, but the dashboard showed nothing even though it has the h1 tag on the jsx (but other pages work perfectly except dashboard). The html of the dashboard showed "You need to enable JavaScript to run this app." . Anyone can help? Thanks in advance and have a nice day :)

dashboard code:

export class Dashboard extends Component {
  render() {
     return (
      <h1>
        hello
      </h1>
    )
  }
}

dashboard's html:

enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
216 views
Welcome To Ask or Share your Answers For Others

1 Answer

For the sake of UX, it renders that to inform users that this website need JavaScript ( they may disabled it manually ) and they shouldn't wait for the website to show up; and/or clears the confusion that the website is not broken ( due to errors or something )


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...