豆豆友情提示:这是一个非官方 GitHub 代理镜像,主要用于网络测试或访问加速。请勿在此进行登录、注册或处理任何敏感信息。进行这些操作请务必访问官方网站 github.com。 Raw 内容也通过此代理提供。
Skip to content
This repository was archived by the owner on Dec 10, 2021. It is now read-only.
This repository was archived by the owner on Dec 10, 2021. It is now read-only.

No use of Routes in App.js #45

@Yuvrajhere

Description

@Yuvrajhere

Describe the bug
The BrowserRouter is imported and used in index.js but no Routes are being used to render specific Components in App.js , which leads to same render for all the routes. Also, because of this, the component not-found never renders for unknown urls.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'localhost:3000/'
  2. This should render the home-page component.
  3. But because of no Routes being used, going to 'localhost:3000/any-string' still renders the home-page and does not render not-found component.

Expected behavior
Going to localhost:3000/ should render home-page component and for all other unknown routes like 'localhost:3000/example' should render not-found component.

Screenshots
Screenshot (481)
See the URL.

Desktop (please complete the following information):

  • OS: [Windows 10 home, any]
  • Browser [Chrome, any]
  • Version [89.0.4389.114, any]

Smartphone (please complete the following information):

  • Device: [any]
  • OS: [any]
  • Browser [any]
  • Version [any]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions