【问题标题】:react-router transitionTo(routeNameOrPath, [params[, query]]) hide query from URLreact-router transitionTo(routeNameOrPath, [params[, query]]) 从 URL 隐藏查询
【发布时间】:2015-03-12 01:43:35
【问题描述】:

我正在触发一个方法: this.transitionTo('route', {},{search: this.state.search, type: this.state.type});

在 URL http://...route?search=%param10&type=param2 中传递查询参数

是否有等效的方法可以传递这些参数而不在 URL 中打印??

【问题讨论】:

标签: javascript reactjs react-router


【解决方案1】:

试试这个:

this.transitionTo("route", { search: this.state.search, type: this.state.type });

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2015-09-15
    • 1970-01-01
    • 2021-02-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多