Is it possible to have routes in react app

Can I use react router-router-dom in freshdesk react-app to implement routes in the app.

It’s not recommended to use React Router in a Freshdesk React app as Freshdesk provides its own routing mechanism using the Freshdesk app SDK.

Instead, you should use the fd-router component provided by Freshdesk to navigate between pages and handle routing within your app.

Here’s an example of how to use fd-router in a Freshdesk React app:

import React from 'react';
import { render } from 'react-dom';
import { Router, Route } from '@freshworks/react-router';

import Home from './pages/Home';
import About from './pages/About';

render(
  <Router>
    <Route exact path="/" component={Home} />
    <Route path="/about" component={About} />
  </Router>,
  document.getElementById('root')
);

For more details check out our codelabs tutorial
https://developers.freshworks.com/tutorials/codelabs/react-fdk/index.html?index=..%2F..index#0

This topic was automatically closed 6 days after the last reply. New replies are no longer allowed.