# Adding links in React (using React Router and CardLink)

**URL:** https://publichappinessmovement.com/t/topic/2863
**Category:** Front End - Documentation
**Tags:** documentation, links, react-router, urls, webdev, reactjs, docuss
**Created:** [2 April 2022 00:26 UTC](https://publichappinessmovement.com/t/topic/2863 "2022-04-02T00:26:56Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![AndyatFocallocal](https://publichappinessmovement.com/user_avatar/publichappinessmovement.com/andyatfocallocal/32/651_2.png) [@AndyatFocallocal](https://publichappinessmovement.com/u/AndyatFocallocal)
#### Post date: [2 April 2022 00:26 UTC](https://publichappinessmovement.com/t/topic/2863/1 "2022-04-02T00:26:57Z")

</div>

Urls added in the React or Docuss part of the code need to be valid React links.

In fl-maps, Docuss relies on React Router to interpret links correctly, so any link not going through React Router won’t work.

You can see an example of it being pulled in [here](https://github.com/focallocal/fl-maps/blob/master/imports/client/ui/pages/Home/ProjectsSection/Item/index.js#L28) (and everywhere else where class CardLink is used). Rather than using “href” please use this:

`<Link to='/something_here'>Go to somewhere</Link>`

If you need to escape a recursive window from opening a Discourse link inside our React app, which goes to a Discourse link, you need to add:

---

<div class="post-metadata">

### Author: ![AndyatFocallocal](https://publichappinessmovement.com/user_avatar/publichappinessmovement.com/andyatfocallocal/32/651_2.png) [@AndyatFocallocal](https://publichappinessmovement.com/u/AndyatFocallocal)
#### Post date: [2 April 2022 00:29 UTC](https://publichappinessmovement.com/t/topic/2863/2 "2022-04-02T00:29:08Z")

</div>



---

<div class="post-metadata">

### Author: ![Marvelxy](https://publichappinessmovement.com/user_avatar/publichappinessmovement.com/marvelxy/32/696_2.png) [@Marvelxy](https://publichappinessmovement.com/u/Marvelxy)
#### Post date: [4 April 2022 22:38 UTC](https://publichappinessmovement.com/t/topic/2863/3 "2022-04-04T22:38:40Z")

</div>

Hey @AndyatFocallocal ,

I added a fix. Let me know if this works. [Replace cardlink with react link component. by Marvelxy · Pull Request #1123 · focallocal/fl-maps · GitHub](https://github.com/focallocal/fl-maps/pull/1123)

Also, I noticed this task is not on the board, and I don’t know why. I’m currently working with Trello and Jira, so i keep forgetting how our board works 🤦‍♂️ . When you can, please help me add this task to the board.

---

<div class="post-metadata">

### Author: ![AndyatFocallocal](https://publichappinessmovement.com/user_avatar/publichappinessmovement.com/andyatfocallocal/32/651_2.png) [@AndyatFocallocal](https://publichappinessmovement.com/u/AndyatFocallocal)
#### Post date: [5 April 2022 12:48 UTC](https://publichappinessmovement.com/t/topic/2863/4 "2022-04-05T12:48:09Z")

</div>

Ok, done 🙂
