UI5 / UI5/sample-webcomponents-react

Client-Side navigation not working

Offen
#78 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Vorherrschende Sprache
TypeScript
Sterne
62
Forks
23
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

I have deployed the react ui5 application in SAP BTP. When I introduce routing using react-router-dom it is saying File Not found

approuter->xs-app.json
{ "welcomeFile": "/salesorderapp" }

public->xs-app.json
{ "welcomeFile": "/index.html", "authenticationMethod": "route", "logout": { "logoutEndpoint": "/do/logout" }, "routes": [ { "source": "^(.*)$", "target": "$1", "service": "html5-apps-repo-rt", "authenticationType": "xsuaa" } ] }

App id is also added to manifest.json
The routing logic
<Routes> <Route path='/' element={<div>Main</div>}/> <Route path='detail' element={<div>Detail</div>}/> </Routes>

Initially the page is loading Main div . But when I hit the detail route, it is saying File not found

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Start by reproducing navigation from the Routes definition, then inspect approuter->xs-app.json, public->xs-app.json, and manifest.json together with the SAP BTP deployment setup. Verify that loading the detail route directly reaches the React application instead of returning File not found; the issue is complete when the detail view loads through client-side navigation.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
react, typescript
Bereich
cloud, frontend, web-dev
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.