# Adding Navigation In React SSR

Part 2 of [Server Side Rendering with React](https://anilvermaspeaks.medium.com/server-side-rendering-with-react-865874b6a6c7)

Please Go through with above mentioned link before reading below setup. It is part 2 of [Server Side Rendering with React](https://anilvermaspeaks.medium.com/server-side-rendering-with-react-865874b6a6c7)

Adding Navigation in React App with SSR is very simple. As a React Developer, you know that **BrowserRouter** Needed for Routing but on server side **BrowserRouter** will not work. So We have **StaticRouter** on Server side and BrowserRouter for Client side.

1.  **Go to index file and make following change**

Express as server will not handle our routing logic. it will pass all incoming requests to React and React will handle all request.

**2.** **Create a Routes.js file inside client folder**

This will we shared file. it will be used for server side loading and hydration on browser(React Side).

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1639214284272/XBYs9R4aB.png)

**3\. Now change renderer.js file like**

So, Same as React, we have to wrap routing with **StaticRouter** to work perfectly on server side. context is required property of **StaticRouter** , So on initial setup, we can assign it with blank OBJ. Location props is optional for initial setup.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1639214286065/78bxFzepa.png)

**4\. Change Client.js file**

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1639214287793/DqfbU5mKd.png)

By Doing this changes , Routing will be enabled. Enjoy React Coding…
