How to implement React router in Jira cloud and server

Hi,
I am trying to develop react project in the Jira cloud and server.
Frontend as React and Backend as Java Spring Boot. I want to add React-Router to my project. Anyone, please help me to implement react-router in Jira App.

Thank you

2 Likes

Have the same question for the jira cloud

For Jira Server is was easy for me:
Your basename should be base url of jira instance.

import AJS from 'AJS';
const link = AJS.contextPath();
function App() {
    return (
        <Provider store={store}>
            <HashRouter basename={link}>
                <ConfigurePageContainer/>
            </HashRouter>
        </Provider>
    );
}

1 Like