react-router-hash:用于React应用程序的最小路由器

时间:2021-07-24 01:26:04
【文件属性】:
文件名称:react-router-hash:用于React应用程序的最小路由器
文件大小:6KB
文件格式:ZIP
更新时间:2021-07-24 01:26:04
JavaScript react-router-hash A minimal router for react app, only supports hash url React极简路由,仅支持hash url,可以采用两种方式进行路由配置,其中第二种配置必须在Router节点上配置sign="colon" 支持简单正则格式,例如数字,这样在组件中获取的参数也是数字 config 这三个参数都可以配置在Router根节点中 config __root 配置根路由,也hash值为空时展示的页面 __default 配置默认路由,路由匹配失败时展示的页面,不配置时页面不跳转 __error 配置错误页面,当页面中调用this.props.toErrorPage()方法时展示的错误页面 props __params 获取hash url的参数,例如#a?a=1 中,this.props.__params
【文件预览】:
react-router-hash-master
----.babelrc(102B)
----index.js(8KB)
----package.json(863B)
----src()
--------index.js(4KB)
----.gitignore(49B)
----README.md(3KB)

网友评论