我正在触发一个方法:
this.transitionTo('route', {},{search: this.state.search, type: this.state.type});
在 URL http://...route?search=%param10&type=param2
中传递查询参数
是否有等效的方法可以传递这些参数而不在 URL 中打印??
最佳答案
试试这个:
this.transitionTo("route", { search: this.state.search, type: this.state.type });
关于javascript - react-router transitionTo(routeNameOrPath, [params[, query]]) 从 URL 隐藏查询,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27933374/