---
title: "Comment by Kenan on \"React Tutorial using MERN stack\" | Hashnode"
description: "I&#39;m having problems adding priority and status query to url. When I use this.props.history.push , like you did, I get a warning that it&#39;s deprecated. Bu"
url: "https://hashnode.com/posts/react-tutorial-using-mern-stack/568963f09a4538cecc3ae583/comment/56b4a970a1ebef383f9b5788"
---

[Discussion](https://hashnode.com/posts/react-tutorial-using-mern-stack/568963f09a4538cecc3ae583)

Comment [React Tutorial using MERN stack](https://hashnode.com/posts/react-tutorial-using-mern-stack/568963f09a4538cecc3ae583)

[Kenan](https://hashnode.com/@ice32)

[Feb 5, 2016](https://hashnode.com/posts/react-tutorial-using-mern-stack/568963f09a4538cecc3ae583/comment/56b4a970a1ebef383f9b5788)

I'm having problems adding priority and status query to url. When I use `this.props.history.push`, like you did, I get a warning that it's deprecated.

But when I use `browserHistory.push({search:'?' + $.param(filter)})`, I get url that looks like this `[localhost](http://localhost:3000/?priority=p3&status=new#/bugs?_k=ai2nnc)` and it doesn't get recognized by `this.props.location`.

[Kenan](https://hashnode.com/@ice32)

[Feb 5, 2016](https://hashnode.com/posts/react-tutorial-using-mern-stack/568963f09a4538cecc3ae583/comment/56b4a970a1ebef383f9b5788#reply-56b4f8e18df4612e2ef9c476)

Also, why is cursor.next() used? Why should we return next document instead of the current one?

[Vasan Subramanian](https://hashnode.com/@vasan)

[Feb 8, 2016](https://hashnode.com/posts/react-tutorial-using-mern-stack/568963f09a4538cecc3ae583/comment/56b4a970a1ebef383f9b5788#reply-56b82f0ca0967efc587c7e12)

`this.props.history` is deprecated, because in history 2.0 the right way to do it is using `this.props.router`. If you use browserHistory, you are setting the URL's search path, not the search part of the hash. If you don't like `this.props.history`, then try hashHistory instead of browserHistory, that'll work because it will set the hash part correctly. Alternatively, read up on [Histories](https://github.com/rackt/react-router/blob/v1.0.3/docs/guides/basics/Histories.md#histories) and try using browserHistory instead of hashHistory (which is the default) in the router.

[Vasan Subramanian](https://hashnode.com/@vasan)

[Feb 8, 2016](https://hashnode.com/posts/react-tutorial-using-mern-stack/568963f09a4538cecc3ae583/comment/56b4a970a1ebef383f9b5788#reply-56b82fd1a0967efc587c7e16)

`find()` returns a cursor, and the only way to get to the first document is by calling `next()` on it. There is no 'current' document. We could have used the deprecated `findOne()` instead, which returns the first document directly.

[Kenan](https://hashnode.com/@ice32)

[Feb 10, 2016](https://hashnode.com/posts/react-tutorial-using-mern-stack/568963f09a4538cecc3ae583/comment/56b4a970a1ebef383f9b5788#reply-56bb5e59309f156c4fd3a404)

Thank you, I've managed to get it working. I'm using hashHistory and 'this.context.router.push'. I've switched to ES6 classes in the process, I don't know if that was necessary. Here's my code for BugList component if anyone needs it. [https://jsbin.com/wuvexa/edit?js](https://jsbin.com/wuvexa/edit?js)
