Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@jackgreen/react-router-view

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jackgreen/react-router-view - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

2

package.json
{
"name": "@jackgreen/react-router-view",
"version": "1.1.0",
"version": "1.1.1",
"private": false,

@@ -5,0 +5,0 @@ "main": "dist/index.min.js",

@@ -16,2 +16,8 @@ # react-router-view

{
path: '/',
component: Home,
// 精确匹配
exact: true
},
{
path: '/single',

@@ -33,2 +39,14 @@ component: Single

]
},
// 配置 404
{
path: '/404',
component: NotFound
},
// 其他没有匹配到的路由,都会重定向到 404
// 必须放在最后,原理是渲染 Redirect 组件
{
path: '*',
// 重定向到 404
redirect: '/404'
}

@@ -35,0 +53,0 @@ ]

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc