Salih Mert ASA
Salih Mert ASA

Reputation: 11

React router is just showing a blank page after I structure like the şmage below

This is app.js

As result I just see a white page. I don't see any errors or anything.

Upvotes: 0

Views: 61

Answers (1)

Drew Reese
Drew Reese

Reputation: 203208

The Route component API's element prop takes a ReactNode, a.k.a. JSX. Buy should be rendered as JSX, not passed as a reference to the component.

Example:

<Route path="/" element={<Buy />} />

Upvotes: 3

Related Questions