Connect Addon-on and React-Router issues

I’m new to web developing and Jira add-ons so this question might be a little silly.
For starters I’ve made some views (jsx files) which I then serve to my add-on via endpoints which I’ve created and registered to my atlassian-connect.json. Basically I use the already preloaded server-side-rendering.js file (and do something like res.render(MyJSX.jsx)).
This works. But then I’ve tried to add some routing, with react-router-dom, and the addon crashes as soon as the page loads (error: Browser history needs a DOM). At first I used RouterBrowser which is used mainly for client-side-rendering. Then I understood that the addon uses server-side-rendering so I added a StaticRouter in the react-layout.hbs which rightfully didn’t work either. Is there a simple way to implement routing using what is already build in the framework or should I just follow the way to use React with SSR.